Pathfinding problem

Get help using Construct 2

Post » Mon Mar 21, 2016 11:23 am

Hello,

Here's a little capx to display a pathfinding problem. Any click to move the red sprite. Try to go left or right and see that it can pass through diagonal walls. R to retry and space to display obstacle map.
https://www.dropbox.com/s/ta0lowufer55sm6/PathfindingProblem2.capx?dl=0

Is this an intended behavior of the pathfinding plugin ? I use a cell border of -1 because otherwize the obstacles are way too large. And a cell size of 32, the size of the tiles. Why does the pathfinder ignore the size of the object that's moving, and make it pass through diagonals.
Last edited by Nabu0001 on Wed Mar 23, 2016 10:57 am, edited 1 time in total.
B
14
S
4
Posts: 112
Reputation: 1,287

Post » Tue Mar 22, 2016 8:32 pm

Hello ? Nobody ?
B
14
S
4
Posts: 112
Reputation: 1,287

Post » Wed Mar 23, 2016 10:58 am

Really ? Nobody ? I edited the link in the first post so it now displays the pathfinder nodes onscreen. This is a strange behavior.

Please, I need help on this.
B
14
S
4
Posts: 112
Reputation: 1,287

Post » Sat Mar 26, 2016 8:47 pm

If some other people get stuck with the problem, I came with a backup solution. The problem is to keep objects moving in diagonal but also to not find path between two close diagonal tiles.

Use the Pathfinding behavior with diagonals off, only to find a path and avoid setting path between two diagonal tiles. And for the movement, use another behavior and regularly test if the next node on the path is in line of sight or directly reachable via raycasting or whatever. If so, then set the object to follow on with this next node.
B
14
S
4
Posts: 112
Reputation: 1,287


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests