Sorry if this sounds rather convoluted, but I have a rather complicated CFrame related question.
How can I calculate the CFrame at which I would need to set a weld’s C0 property to make this turret face a part? (or any welded part system for that matter)
All of this is unanchored, the idea is that the car would be able to move around freely, without the physics of the turret causing any issues either (so no BallConstraint/BodyGyro solutions please).
WeldConstraint’s wouldn’t work very well either since you can’t directly edit their value, and although I could try to set the part’s CFrame, it would likely drift off as the car starts moving.
From what I know there is a lot of CFrame API that should be able to help me here, but I’m just not 100% sure which to use. I know how basic CFrame API works such as Angles, lookAt, new, etc. If anyone can point me in the right direction that would be awesome.
CFrame.new(Part1.CFrame, YellowSphere.CFrame) --change 'Part1' and 'YellowSphere' to the parts you want
The reason I only put two positions in the CFrame is because when you put two it changes the 1st position to face the second. I’m not fully sure if this will work but try it out.