Pathfinding delay

Get help using Construct 2

Post » Sun Sep 28, 2014 1:53 am

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.
You do not have the required permissions to view the files attached to this post.
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Sun Sep 28, 2014 8:44 am

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

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.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Sun Sep 28, 2014 3:54 pm

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.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650

Post » Sun Sep 28, 2014 4:44 pm

@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
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643


Return to How do I....?

Who is online

Users browsing this forum: bclikesyou, Google [Bot], ST314, Yahoo [Bot] and 28 guests