How can I see the direction of a moving sprite (who's using pathfinding) without looking for angles?

0 favourites
  • 6 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • So I have this little chicken who I want to move around every few seconds in this little field. Basically I just need to check it's direction so I can mirror the sprite so its looking in the direction its walking. I Because I only want the chicken to move left and right and up and down, but not change angles (only move left and right) i cant find a way around this. If this isnt clear I can provide screenshots and code. Thank you

  • You can use Sprite.Pathfinding.MovingAngle expression. If the moving angle is between 90 and 270 degrees, set the sprite mirrored.

  • I tried that. The problem is since I need to sprite to not rotate, rotation is turned off, so no angle is being set, its always at 0.

  • I'm talking about Pathfinding.MovingAngle expression, not sprite rotation angle.

  • How do I access the expressions. I do not see anywhere where I can actually put in this stuff. I dont know if i mentioned this, but im using C2, not C3 in case that makes any difference

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you are adding events or actions in C2/C3 and you see a field which allows you to type something - you can use expressions there.

    For example, add the following event: System -> Is between angles.

    If you click "Find expressions", you will find literally hundreds of useful expressions there.

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