I want to make a "game", with a pistol that always aim to where your mouse is, and shoots when you press the mouse button.
I have the pistol, but I don't know how to rotate it to the rigtht position, and I'm only 13 years old so I don't know enough math...
I'd be happy if you can give me a code that can rotate the pistol to the right position, and even happyer if you can explain what does the code actually do so I'll understand.
>Be sure that the 'center' of the gun is the point you want it to rotate around
>Aim it toward the right in the drawing (that's just how this code expects it to be oriented)
>put this code on the gun: