How do I preserve 8 direction angle of motion?

0 favourites
  • 3 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • Does anyone have any experience/tips regarding the preservation of the last MovingAngle for the 8 direction behavior? Upon coming to a stop, MovingAngle resets to 0.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks! Should have mentioned 8 direction isn't setting the sprite's angle, but simple enough to use an instance variable instead of the angle.

    It's an isometric view, using 8direction.movingangle to set the frame showing which direction the sprite should face. First issue occurred when stopping, the sprite would always face right. Got around this by updating the animation frame only when not stopped, but that would still always end up at 90 degree angles due to how the behavior stepped motion.

    Looks like the key is to stop updating the angle upon releasing input. I don't think I need to use anglelerp, although its nice how it normalizes different ways angle is represented.

    Second issue was an input that would add a short burst of speed. While moving is fine, but when stopped it would always boost to the right. I don't see a way to specify angle of motion with 8 direction in an action, so I guess I'll just have to set vectors based on the stored angle.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)