flash - Move an object in the direction its pointing Actionscript 3 -



flash - Move an object in the direction its pointing Actionscript 3 -

i'm messing in actionscript 3 , trying move object, can move on y axis have set object , rotate trying move in direction pointing not restricted move along y or x axis

anyone have tips?

just basic trigonometry should trick.

var speed:number = 10; var angle:number = math.pi/2; obj.x += speed * math.cos(angle); obj.y += speed * math.sin(angle);

for more advanced wizardry recommend learning linear algebra. start can made here :)

actionscript-3 flash actionscript

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -