Hi all, I need a bit help here. I’m making an Asteroids clone game, using Box2d. I’m in trouble with the spaceship movements. I use :
ship:applyLinearImpulse( fx, fy, ship.x, ship.y )
in Runtime when user touch a button, the force is applied along the correct ship axe with some trigonometry calc.
The ship surfs very well so like the original of Atari.
Problems come when I try to set a max speed for the ship, I’ve tried several paths but I crash in strange behaviours, and none of them works. The true is that I have no idea on how to make this.
I know that for Newton laws also a minimum continous force applied to an object in space accelerates the object infinitely up to the speed of light, if we do not consider Einstein’s relative theory, but this is just a game so…but maybe could be a little hard to set this max speed inside a physic engine like Box2d?
I know that I could make the game without Box2d, but I have created 2 little games with Corona without it, I would use it for this.
Sorry for my English.