Rotation help
[deleted]
So I'm making a multiplayer shooting game in javascript. I want to make the gun point torwards the mouse pointer. The gun is the little red rectangle that is below the player. I can't get it to rotate torward the mouse pointer. The code starts at /client/client.js line 103.
Can you explain how to make it point to the mouse pointer?
Your code is a bit much to understand so I have made a mock up that shows how to rotate a "gun": https://rotating-gun--malvoliothegood.repl.co