Pathfinding Behavior

Discussion and feedback on Construct 2

Post » Sun Apr 06, 2014 10:36 am

I recently started porting an old project of mine (adventure point and click made with wintermute at the time) to construct 2.
My character is made with spriter and i am using the pathfinding behavior to move it around obstacles (cell size 40, border -1).
I got 2 strange bugs:

1. When the character switches direction (mirror) there is about 2-3 seconds delay before the path is calculated, if i continue walking in the same direction, no matter how many obstacles or distance i walk, the calculation is almost instantly.
I tried increasing the cell block size, or cutting down the sprites obstacles to min 4 instances, but nothing helps.

2. Sometimes when i switch direction while the character is still moving in the other direction, the character does a strange semicircle shaped sine movement.

Anybody encountered these problems?

here is the demo:

https://googledrive.com/host/0B3JLq-yXZ ... d6VllESzQ/
Image
B
71
S
28
G
12
Posts: 515
Reputation: 12,284

Post » Sun Apr 06, 2014 11:28 am

Which version of construct 2 are you using
B
6
S
2
G
3
Posts: 1
Reputation: 2,383

Post » Sun Apr 06, 2014 11:40 am

Latest stable 163, but i checked there were no updates regarding pathfinding in 164/165.
Image
B
71
S
28
G
12
Posts: 515
Reputation: 12,284

Post » Sun Apr 06, 2014 11:45 am

I think you're meant to report this as a bug, with an example cpx.
B
12
S
3
G
4
Posts: 57
Reputation: 3,186

Post » Sun Apr 06, 2014 12:55 pm

I will, as last resort, i wanted to see if anyone has encountered these bugs or already reported them before i do.
Image
B
71
S
28
G
12
Posts: 515
Reputation: 12,284

Post » Sun Apr 06, 2014 7:51 pm

Seems that the pathfinding object is just turning. Try increasing the turning rate.
B
34
S
9
G
3
Posts: 517
Reputation: 5,206

Post » Sun Apr 06, 2014 8:14 pm

Great! thanks, it helped!
I thought that this param only applies when Rotate Object is set to YES, it didn't even cross my mind to check it!
Thanks again.
Image
B
71
S
28
G
12
Posts: 515
Reputation: 12,284

Post » Sun Apr 06, 2014 8:40 pm

Katala wrote:Seems that the pathfinding object is just turning. Try increasing the turning rate.


Hey, that actually helped me with my game too! I got so carried away with other things that I kinda glanced over rotation speed since I'm just using the box as a pathfinding device that the characters are pinned to. But now they can turn around the other direction faster. Cool stuff.
B
72
S
29
G
35
Posts: 340
Reputation: 22,721


Return to Construct 2 General

Who is online

Users browsing this forum: blackhornet and 1 guest