AlignOrientation does not respect the orientation of the airship when calculating rotation. For example, if I turn the airship a certain direction, then try to apply a tilt, the tilt is applied relative to the worldspace instead of the ship.
I’ve tried using ToWorldSpace, however that hasn’t done anything. Here is my alignorientation code:
local alignOrientation = Instance.new("AlignOrientation")
alignOrientation.Parent = parent
alignOrientation.Mode = Enum.OrientationAlignmentMode.OneAttachment
alignOrientation.Attachment0 = model.Main.FlyAttachment
alignOrientation.MaxTorque = AirshipConfig.DefaultMaxTorque
alignOrientation.Responsiveness = AirshipConfig.DefaultResponsiveness
alignOrientation.MaxAngularVelocity = AirshipConfig.DefaultMaxAngularVelocity
alignOrientation.PrimaryAxisOnly = false
And below is my alignment code:
local newCFrame = CFrame.Angles(math.rad(nLean), 0, math.rad(zLean))
alignOrientation.CFrame = newCFrame
Thank you for any help!