PDA

View Full Version : How do I rotate an arrow to point at a movieclip?



Mike D
September 15th, 2005, 10:34 PM
I need to:

a) Gradually rotate an arrow to point towards a moveclip (this is simple)
and
b) Have it to take the shorter path (either clockwise or counter-clockwise depending on the situation). (can't figure this out)

Can I get some help with the math and/or pseudo-code?

Thanks!

kookaburra
September 16th, 2005, 01:21 AM
I need to:

a) Gradually rotate an arrow to point towards a moveclip (this is simple)
and
b) Have it to take the shorter path (either clockwise or counter-clockwise depending on the situation). (can't figure this out)

Can I get some help with the math and/or pseudo-code?

Thanks!

I can give you fla for this if you want.
It has only 1 stetement of code.

Mike D
September 16th, 2005, 09:37 PM
Nope that's not the effect I'm looking for. If the arrow were to only begin to rotate when I click the mouse that would be the same idea as what I'm after (and it would have to rotate the shorter distance - clockwise or couner-clockwise).