if i have an actor that moves by itself how do i animate which way it is going

THINGTHINGTHINGTHING Member Posts: 84
edited November -1 in Working with GS (Mac)
if i have an actor that moves by itself how do i animate which way it is going

Comments

  • ORBZORBZ Member Posts: 1,304
    you make a set of animations for each movement direction. So if you can move left and right then you make a set of animations for left, and another set for right.

    motion.linearVelocity.x to determine the direction your actor is moving.

    [tip: if you are moving in an arbitrary direction you can use vectorToAngle(motion.linearVelocty.x, motion.linearVelocity.y) to get an angle. However, if you're just going left or right simply checking linearVelocity.x is simpler.]

    Unfortunately there is not YET any mirror functions in GS. (there really should be though)
Sign In or Register to comment.