|
-
-
code:
// anywhere in main timeline
var RAD2DEG = 180 / Math.PI;
// on the MC enterFrame:
var dx = _root._xmouse - this._x;
var dy = _root._ymouse - this._y;
var angle = Math.atan2(dy, dx);
this._rotation = (RAD2DEG * angle) + 90;
Here you go buddy, becasue I like your name and cheese also...
-
Senior Member
Please use a descriptive title and proper words, it isn't a text message...
Your looking at basic trigonometry to solve your problem:
http://www.moor47.fsnet.co.uk/tuts/trig_example.fla
fracture2 - the sequel
fracture - retro shooter
blog - games, design and the rest
"2D is a format, not a limitation" -Luis Barriga
-
thanks for your help
imma try out the code and see how it works
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
|