Top-Down Ship Physics - Help

I’m working on a game that is, at its core, a clone of the game Starsector. Ships are seen from above, and the battlefield is 2D. There is no Y (up/down) axis.

The game is playable in its current state, however the physics are very lacking. Ships without a player “inside” them act like either ragdolls or bricks. Ships that have a player “inside” completely ignore being rammed by other ships.

Ships have massless parts for their visuals, welded to a part called Root that has a mass, which has bodymovers for position and orientation. Ships sit atop an invisible platform, and under a second. When controlling a ship, players are given network ownership. In the future, when I give ships a “cpu” so they can act, the server will control them the same way.

My biggest concern is my lack of control over ships. The physics seem unresponsive, and I cannot find the proper values for the bodymovers. In addition, when I add momentum, I fear that all ships ramming each other would become particularly ugly as, weather I use a variable or roblox’s own physics, the transfer would be off.

What is the best way to calculate the amount of force to apply with a bodymover? Should I instead CFrame ships, checking collisions with raycasts? Should the server have full control of all ships? Physics issues have been pestering me for months, I cant keep putting off these fixes.

1 Like

A fellow Starsector fan,

So Bodyposition and such? Those tend to resist to resist knockback and force itself to go to a set position.

If it is bodyposition I would recommend trying out using bodyforce instead, perhaps the result is different and you can adjust the amount of counteracting force as drag force.

I’m currently using AlignPosition and AlignOrientation. BodyForce appears only to change position, which isnt enough. Additionally, now that I’ve moved all ship functions to the server (copied and pasted the code, running server and both clients locally for testing), there is a large (~0.75 second) lag between when the player presses a key and the ship starts moving, even though the keybinds are recognized instantly. Roblox physics confuse me.