Mouse Movement - Starship

Hi, forgive me for the vague post. I’m currently decorating and want to concept a few ideas prior to working on my project later.

I’m looking at creating a Mouse Movement piloting system for my Starship.

The way my ship works is by having two seperate instances: Exterior & Interior.

The Player will pilot the ship by sitting in the pilot seat in the interior, the camera then displays the exterior. (which is shrunken down, giving the illusion that Planets are larger.) This is all sorted.

But how could I implement a basic MM control? I take note there’s that glitch that causes Body Movers to react odd when placed over the moving entity.

How could this be avoided?

Thanks, I will update this with progress as it goes on.

2 Likes

You could use body positions and body gryo.

use a local script, and do :GetMouse() then use mouse.Hit.Position in a function along the lines of

local mouse = game.Players.LocalPlayer:GetMouse()
local gyro = Instance.new("BodyGyro")

-- then when they move their mouse, just connect it to a hook or something
gyro.CFrame = CFrame.new(gyro.Parent.Position, mouse.Hit.Position)

after that as long as you have the velocity going straight itll go forward in the direction of their mouse.

to get around the mover glitch, perhaps try using a check to see if the position is on the part by raycasting?

1 Like