90 Degree Turns at Max Velocity in Asteroids

Recommended Posts

Hi. I am working on a 2D asteroids game, and I have hit a snag with the 'standard' asteroids maths.

I have implemented into my game (I am using BabylonJS to render, but this isn't a babylon issue).

That the problem is:


  • Press W Key to accelerate 'up' and hold it there until you reach the maximum value.
  • Then release the W Key and the momentum will continue.
  • Rotate ship to 90 Degrees and hold W again.
  • Because the Max velocity values are already met, you can never end up going 'streight'. Rather you will then cap out at a sort of 45 degree,

How can I adapt the maths to be able to cancel out the y (or x) value if there is no direct thrust in that direction?




Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.