Hello everyone, I’m trying to create a player controlled hot air balloon and so far It’s going pretty well, I’m using a body velocity to handle it’s movement.
The issue is that I do not know how to make this movement accurate, I can use the roblox control module to get the players current input and translate that into Look & RightVector to achieve the desired effect, however, the way I’m achieving that doesn’t allow the balloon to travel in any other directions other then exactly forward backward, left and right, no diagonal, which would be especially annoying to mobile users.
I’ve tried multiple times in the past at fixing this issue but this is one of my first times using body movers so I’m a bit confused, anyway, here’s my bad approach:
connection = RS.Heartbeat:Connect(function()
if hum and hum:GetState() == Enum.HumanoidStateType.Seated then
local CurrentVector = ControlModule:GetMoveVector()
if CurrentVector.Z > 0 then
BodyVelocity.Velocity = Vector3.new(-Prime.CFrame.LookVector.X * 10,BodyVelocity.Velocity.Y,-Prime.CFrame.LookVector.Z * 10)
elseif CurrentVector.Z < 0 then
BodyVelocity.Velocity = Vector3.new(Prime.CFrame.LookVector.X * 10,BodyVelocity.Velocity.Y,Prime.CFrame.LookVector.Z * 10)
elseif CurrentVector.X > 0 then
BodyVelocity.Velocity = Vector3.new(Prime.CFrame.RightVector.X * 10,BodyVelocity.Velocity.Y,Prime.CFrame.RightVector.Z * 10)
elseif CurrentVector.X < 0 then
BodyVelocity.Velocity = Vector3.new(-Prime.CFrame.RightVector.X * 10,BodyVelocity.Velocity.Y,-Prime.CFrame.RightVector.Z * 10)
else
BodyVelocity.Velocity = Vector3.new(0,BodyVelocity.Velocity.Y,0)
end