I am creating a flight system for a superhero game and I am trying to replicate the maneuvers done in other games when turning backwards/ forwards.
I have already put a turning system in place with a tilt mechanic using an Align Orientation tool.
I have looked on the dev forum and read the CFrame & Align Orientation documentations but still I have no idea how to get this result.
I am trying to replicate the backwards/ forward turning like in Iron Man Simulator 2 by Ignite Games and Hero And Villain Battlegrounds by Hero and Villain Battlegrounds Fan Group. For example:
Mine:
My turn code :
local flightAlign = Instance.new("AlignOrientation", HumanoidRootPart)
local Direction = Camera.CFrame.RightVector * (MoveVector.X) + Camera.CFrame.LookVector * (MoveVector.Z * -1)
local Tilt = (CFrame.lookAt(HumanoidRootPart.CFrame.Position, HumanoidRootPart.CFrame.Position + Direction))-- Actual Turning
* CFrame.Angles(0, 0, -math.asin(MoveDirection.X) * 1.5) -- Tilt
* CFrame.fromOrientation(-math.pi / 2, 0, 0) -- Rotate Forwards 90
flightAlign.CFrame = Tilt