-
Rotating eye effect
hey im trying to make a game where theres a gun that aims at the cursor... i looked at a tutorial for "the rotating eye" which basically made the eye look at the cursor.
it said to use this code:
// eye rotation
a = eye._y-_ymouse;
b = eye._x-_xmouse;
angleA = Math.atan2(a, b);
degrees = angleA/(Math.pi/180);
setProperty ("eye", _rotation, degrees);
i changed it so it wasnt eye and it was gun to work for my game.. but when i try to play it it says:
There is no property with the name 'pi'.
degrees = angleA/(Math.pi/180);
anyone know what to do???
-
I would suggest posting this in one of the Flash forums here instead of the lounge... more likely to get a reply.
The error most likely is related to an object not having the right name in your movie.
-
Really this is me.....
Got a link to the tutorial in question ??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|