Skip to main content
Participant
May 10, 2006
Answered

need some help

hey.

I been doing some flash for some while and got some way. but... my math isn't so good
and I need a formula.
it's like this, I'm creating a platform shooter. but, the players can turn 360°. that wasn't so hard.
but making the players walk forward and backward is much more difficult...
I know it has something to do with sinus and cosinus but... could anywone help me out

many thx
This topic is closed to new replies. Start a new post to keep the conversation going.
jthereliable-ohDoY4Correct answer
Inspiring
May 10, 2006
_x += speed*Math.sin(_rotation*(Math.PI/180))
_y -= speed*Math.cos(_rotation*(Math.PI/180))

use that in the movie clip... if you want a constant speed, just replace the speed with the constant

2 replies

jthereliable-ohDoY4Correct answer
Inspiring
May 10, 2006
_x += speed*Math.sin(_rotation*(Math.PI/180))
_y -= speed*Math.cos(_rotation*(Math.PI/180))

use that in the movie clip... if you want a constant speed, just replace the speed with the constant
Translate
-_whyv_-Author
Participant
May 11, 2006
thx for the help
Translate