I’m currently experimenting with different forms of flight for my Starship system -
In the past, I’ve used a simple WASD that’s restricted to a single Y axis; meaning it can only move forward, backward, left and right.
I’ve chosen to advance this and allow for a more free-roaming system. I.E. involving the Y axis. As shown below, I’ve got this working using mouse controls, so that Ship will pilot towards the mouse direction. However, I want to adjust this (and maintain the tilting) to allow to work with VehicleSeats.
Meaning that A & D will manage the turning and tilting, and W and S will manage the Up and Down?
I’ve involved the mouse controlled script below.
Can anyone help me make adjustments?
local MaxTilt = 45
while true do wait()
local Tilt = ((((Mouse.ViewSizeX / 2) - Mouse.X) / (Mouse.ViewSizeX / 2)) * MaxTilt)
Tilt = (Tilt < -MaxTilt and -MaxTilt or Tilt > MaxTilt and MaxTilt or Tilt)
BodyGyro.CFrame = (Mouse.Hit * CFrame.Angles(0, 0, math.rad(Tilt)))
if not TurnBack then
BodyVelocity.Velocity = (Exterior.PrimaryPart.CFrame.LookVector * 25)
else
BodyVelocity.Velocity = Vector3.new(0, 0, 0)
end
end