1 | initial version |
There are several ways to boost the velocity of an object on Phaser 2 without altering its orientation:
Increase the acceleration: By increasing the acceleration value, the object will gain more velocity over time, without changing its orientation.
Add a force: You can add a force to the object using the physics engine. This will cause the object to accelerate in the direction of the force without changing its orientation.
Apply an impulse: An impulse is a sudden change in velocity. You can apply an impulse to the object by giving it a sudden boost in velocity in the desired direction.
Change the object's mass: By increasing the object's mass, it will require more force to move it, but it will maintain its orientation.
Use a velocity multiplier: You can apply a multiplier to the object's velocity, increasing it without changing its orientation. This can be done by multiplying the object's velocity by a constant value every frame.