Featured FLA
» Author: Nitin Tikhe
» Title: Cart
» Description: This Animation Tut is a fun and useful for kids below 15 years. Watch the Flag, Doors, Stick and Horse movements.
» More by Nitin Tikhe
Featured Site
» Posted in the Flash Kit Links section
» Title: Banana Swimwear
» Description: This is a banana swim wear interactive catalog we designed and animated in Flash
There are many ways to determine the mouse angle, the main method currently in use involves the use of sine lookup tables and lots of fairly complicated looking loops. What we all want is a fast easy way to determine the mouse angle. This method approximates the angle. The movement of a bullet from the origin to the mouse is also calculated, however this is exact.
Glossary of Terms
Origin - the spot where the mouse angle is relative to. Normalisation - making two values sum to 1, whilst maintaining their relative proportions. Quadrant - the direction of the mouse angle, for this tutorial they are:
up and left
up and right
down and left
down and right