How can I create a cannon who rotate and throw projectiles in particular angles? I used the code in the image below and when the cannon fires a projectile, the projectile flies away in the upper left corner of the screen, rather than going straight to the target. Help me out!
Thank you!
Develop games in your browser. Powerful, performant & highly capable.
Applying a physics force will just push it, you need to set angle of the projectile toward target.x,target.y. The target isn't even mentioned here.
This was already posted here. Please don't repost identical threads.