Kreeba Posted July 14, 2017 Share Posted July 14, 2017 Hi. I am working on a 2D asteroids game, and I have hit a snag with the 'standard' asteroids maths. I have implemented https://codepen.io/SitePoint/pen/rLvZrG into my game (I am using BabylonJS to render, but this isn't a babylon issue). That the problem is: Problem: 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? Thanks Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.