2D Space Game Help with Gravity and Velocity

Hi there, I am creating a simple game in ‘space’. I’ve a couple issues with gravity.

I have a spacecraft and you can control it with WASD or the arrow buttons. I know gravity doesn’t exists in space, but is there a way when you click at W (forward) for example and release it, the spaceship smoothly slows down until it completely stops?

I would like to know how I can achieve this. Thanks!

Hey

If your spacecraft is moving using physics then the RigidBody component has a “drag” parameter that slows down objects over time: Unity - Manual: Rigidbody component reference

1 Like