I need to apply Velocity to a ship based on it's local rotation. My only issue is that the methods that I have tried so far fail in one area: When more then one rotational axis has force applied to it she ship rotates on another axis,
Eg if the X and Y rotational axis both have force applied to them, the Z axis starts rotating as well. Is there any way to fix this?
(if it helps at all I am trying to make a space craft move based on it's rotation applied from a BodyAngularVelocity bodymover)
BodyGyro objects are great for maintaining orientation. Give their CFrame property this constructor:
BodyGyro.CFrame = CFrame.new( [Vector3]Origin, [Vector3]Focus )
As for figuring the direction to apply force, use this formula:
local p = workspace.Part; local power = 100; p.BodyVelocity.Velocity = p.CFrame.lookVector * power;