Jump to content

Get velocity of sprite: no physics, just tween


Recommended Posts

Hey guys!

Right now I have a topdown game where you select a tile and the player will find a path and walk to it, using tween chains.

I have a spritesheet with frames of a character walking up, down, left, right. 

I come from a Flixel background, so I figured I'd be able to check velocity and use that to see which direction I'm going... problem is that looks like a physics thing not a tween thing.

I'll probably just compare last frame's X to the current frame's X... but is there a better way built in?

EDIT: I've tried to check the comparison of the last frame's x and the current frame, but it looks like it stutters to thinking the values are equal when a tween in a chain completes for a frame, and then starts the other tween. (Which is unnoticeable ingame)


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...