I wonder how to apply a angular impulse locally cause i am doing a plane and i want to rotate the plane. I have already watch align orientation, … but they are like velocity. But i want force to have more realism!
I recently had a similar issue. I searched for a solution, but unfortunately, I got none besides this post asking the same question.
Fortunately, after some attempts, I found a way to achieve that.
You can use the object’s Look, Up and Right vectors to reference the local axis.
local Model = script.Parent
local Root = Model.Root
local VehicleSeat = Model.VehicleSeat
-- We can get each of the object's vectors to use its local space instead of a world one.
local RollForce = VehicleSeat.SteerFloat * Root.CFrame.LookVector
local YawForce = VehicleSeat.SteerFloat * Root.CFrame.UpVector
local PitchForce = VehicleSeat.ThrottleFloat * Root.CFrame.RightVector
local RootMass = Root.AssemblyMass
local MaxForce = 2 * RootMass
-- We then add each of these forces together. I've tried multiplying but that cancels them out.
Root:ApplyAngularImpulse((RollForce + YawForce + PitchForce) * MaxForce)
That was my approach to it. Hope it helps.
Thank you! I will try this approach!