detect actor moving direction

gurechangurechan Member, PRO Posts: 211
edited November -1 in Working with GS (Mac)
I'm sure this has been answered here before, but I just can't find it. I'm trying to find the best way to detect if an actor is moving left or right so I can then do something depending on which way it is moving.

I have found, and use the detect if moving tutorial, but need to also know which direction if it is moving. Can any help?

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    if self.linear.velocity.X is > 0 it is moving right
    if self.linear.velocity.X is < 0 it is moving left
Sign In or Register to comment.