Hello, so I was making a player guided missile and soon realised once I change the CFrame of the missile, the BodyVelocity that I had in the missile did not adjust to the new CFrame, i was told that this is because it is relative to the world and not the object. So someone told me to use AngularVelocity, but I don’t know where to start, can anyone help?
Unless I’m missing something, I think you could just do the following:
local maxVelocity = 200
local maxForce = 500
-- The LookVector is already a unit vector by default, meaning we can multiply by a number and that would be the missile’s maximum velocity
MissileCopy.Main.Velocity = MissileCopy.CFrame.LookVector * maxVelocity
MissileCopy.Main.MaxForce = Vector3.new(maxForce, maxForce, maxForce)
-- There’s no reason to have the max force be different in different directions unless you’re trying to make the missile *accelerate* faster in one direction, which would likely look odd for your use case
I think BodyVelocity is either deprecated or legacy so you may want to use LinearVelocity.
So the missile’s LookVector would be for the missile to go straight. You would just replace the missile’s LookVector with a unit vector representing the player’s desired direction. So if you use the player’s camera direction, I think you can just use the player’s camera LookVector instead of the missile’s LookVector.
Yeah, if you go to Model and turn on Constraint Details the LinearVelocity will show a blue arrow. This tells you which direction the part is moving toward.
Do you have any other constraints attached to it? Try putting an angular velocity on it and increasing the max torque of the angular velocity to 100,000. Keep the angular velocity property to vector3.new(0,0,0)
Did you check if the blue arrow of the linear velocity is pointing forward? If yes and it still doesn’t work, try increasing the MaxForce property under the Linear Velocity to 100,000
I can do it for you when I have access to my PC if you want. I’ll publish it as a model and all you have to do is download it and then go to Toolbox > MyModels and click on it