trying to make it so you aim your gun using the mouse- (and the gun rotates around the player.)
is there a way to get the mouse position?
How to get the mouse pos?
- Windows
2 things: calculate the difference of the x and y axis of the mouse and sprite, then use that to get the slope, then have the gun's rotation be along that slope, or just use the "point to" thing and then make the sprite animation for the gun be longer than needed with empty space so it looks like it's rotating.
personLvl 62
gun.pointTo(camera.mouseX, camera.mouseY);