rotate an image in direction of mouse crosshair??

BlitzPlus Forums/BlitzPlus Beginners Area/rotate an image in direction of mouse crosshair??

becuzz316(Posted 2005) [#1]
I am writing a game that shares some characteristics of the ol Missile Command Game (Atari). I want the missile launcher image (located in the mid bottom of the screen to rotate (pivot) in the direction of the mouse crosshair. I know this is possible, but my math skills are minimal. Can someone help me with the code (or point me to some help) to accomplish this. Also, any links you have to assist me with gaining a better understanding of the math required will be greatly appreciated.


WolRon(Posted 2005) [#2]
ATan2