How do I create topdown movement for a spaceship similar to asteroids?

Hello,

I’d like to make a topdown space game with a movement system that feels similar to that of the classic arcade game asteroids.

I’d like W to add a forwards thrust to the player, A,S for ship rotation and unlike asteroids I’d like the S key to apply a braking force to reduce the movement of the player.

Any help would be vastly appreciate, I’m new to unreal and having trouble finding the answers that I need.

Thanks.

hi,
here is a little example



variables:
Throttle - is simple for the movement, so when you release your button the ship will travel on
VelocityGrip - is the range how the ship reacts to a new vector input (when rotate and boost)
all others should be self explanatory

and here is the result

hope this helps your on your way :slight_smile:

cheers :vulcan_salute:

p.s. what i forgot to mention, the ship is a pawn but it can be a character too if you need a skeletal mesh… this is just a squashed cone :smiley:

Thank you for taking the time to help me here, very much appreciate it!
Looking forward to setting this up.

hi,
no problem, if you need any information about the logic, feel free to message me (atm it can take a bit till i can write back, lunch time is over :smiley: )

cheers :vulcan_salute:

Give the ship a Floating Pawn Movement component and call Add Input Vector with the ship forward vector scaled by thrust while W is held. Rotate the actor directly for A and D so turning stays instant like the arcade game. For S, add force along negative velocity or raise braking deceleration so the ship slows without killing drift. you can also try Top Down Space Shooter Game Template, a top down starter with spaceship blueprints, projectile firing, enemy spawner and HUD: Top Down Space Shooter Game Template — Modular Blueprint & C++ Starter Project | Fab