0 Favourites

Pathfinding problem. Found Workaround

  • I have a sprite follow a path then stop and rotate then stop rotating. afterward i have the same sprite move forward then find path and follow. the problem happens right when the sprite follows the new path. it glitches back to the same angle it was last pathfinding at then turns around and begins on its new path. How can I make it not revert back to the angle it was at the last time if was pathfinding? thanks for any help folks.

  • Bump anyone?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Post a capx?

  • Ok i have made some progress and I determined that the pathfinding behavior saves the angle that the sprite is moving at. when the sprite arrives at the end of the path and begins to rotate its (pathfinding) "moveangle" does not stay updated to the current "sprite.angle". so when the sprite has to find a new path it starts its path at the last (pathfinding)"moveangle". my problem now is how to change the "sprit.moveangle".

  • Update:

          I found a workaround. if I give the sprite a path then set Accel and Deccel to 0 it will turn almost completely toward the angle but not move forward or back. the "sprite.movingangle" will be as desired.

    Condition: Blah Blah. Action: Sprite-> Set (path) Acceleration to 0

                          Action: Sprite-> Set (path) Deceleration to 0

                          Action: Sprite-> Set (Path) Rotate Speed to X

                          Action: Sprite-> Find path to (X,Y)

                          Action: Sprite-> Move along path

    Hope it helps anyone else who needs it.

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