I use left and right arrow on keyboard to control sprite direction I want when sprite turns right it shoot right by left click on mouse and when it turns left so shoot left by the same way is left click on mouse. Now i only can shoot one direction. it not consistency how should I do. thank you
Develop games in your browser. Powerful, performant & highly capable.
You could make add an boolean instance variable to player like "looksRight" - or if animation is mirrored
Now if you walk left you set the boolean to false
if walks right then true
and depending if true or false you can set the angle of the bullet.