Pathfinding delay

0 favourites
  • 4 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • I'm working on a point and click, whenever I click somewhere my character walks to there.

    For some reason the pathfinding seens to take a while before starting to move the character, cell size is pretty big and path is extremely simple, only 1 obstacle, so most of the paths have 2 or 3 nodes only.

    Please check out the wip at http://www.cheny.com.br/puleomuro , click "Jogar" at the bottom right on first screen, and on seconds screen click any character.

    You can press "M" to check out the pathfinding cells.

    That doesn't seem to happen when testing the Pathfinding Template that comes with Construct2. Am I missing something?

    I uploaded a capx representing the problem.

  • This is from a post I made a few days ago about the same thing, this is Ashleys answer to that:

    https://www.scirra.com/forum/path-finding-no-slow-down_t116391

    [quote:3vvfbhnk]The problem is pathfinding can take a moment to complete, in which time the object could move to a new cell, requiring a new path to be found from a new starting location... during which time the object could move to a new cell again, and so on.

    If it's noticable, you probably need a larger cell size so paths are quicker to calculate.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The pathfinding behavior takes time to rotate to the correct direction before it moves (even when you have 'rotate object' set to 'no'). If you set the rotate speed very high you won't get that delay.

  • nimos100

    That's not really what was happening because the path didn't have to change at all

    ramones was right on that one, I set rotate object to yes to check and the delay before it started walking was the time it took to rotate.

    Setting rotate speed really high solved the problem.

    Thanks everyone

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