Hi
I am just wondering how I change the direction of a movie clip. And how to make it change in the same it’s moving.
I have random movement code on the clip, I just want it to rotate, in the direction it goes.
Did this make any sense?
schling
Hi
I am just wondering how I change the direction of a movie clip. And how to make it change in the same it’s moving.
I have random movement code on the clip, I just want it to rotate, in the direction it goes.
Did this make any sense?
schling
if you have its velocity on the x axis - vx, and on the y axis - vy, the rotation is found by saying:
_rotation=Math.atan2(vy, vx)*180/Math.PI;
make sure the unrotated clip is facing East (to the right)
Thanks man
:: Copyright KIRUPA 2024 //--