I am frought with problems every step of the way! Thanks The Canadian for helping me with my last one.
So I am making this side scroller game and I have this guy who I want to aim at the mouse (so he can shoot where you are aimng). He has a gun and he needs to rotate it so that it points at the mouse. I got this tutorial about the trigonometry etc but I didn’t understand much of it since trigonometry is next semester for me. Despite my limited understanding of the math I was able to reproduce the simple rotating effect,
BUT
Whenever I added it to my game engine it suddenly behaved erratically and rotated the gun completely wrong. To see what I am talking about:
So can somebody please figure out why it doesn’t rotate correctly?
I’ll put you in the credits if this game ever sees the light of day (I am a notorious quitter).
ABOUT THE FLA
The little ball is just where I am keeping the gravity code until I impliment it.
The green dot on his neck is where the script to rootate the gun is.
The code to make him run around is on the frame.