Pathfinding diagonals bug

Bugs will be moved here once resolved.

Post » Thu Mar 24, 2016 2:38 pm

Problem Description
Pathfinder find path where it should not, in in the diagonals.
Even an object with a size of 1x1 could not pass and follow the returned path.

Attach a Capx
https://www.dropbox.com/s/ta0lowufer55sm6/PathfindingProblem2.capx?dl=0

Description of Capx
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.

Steps to Reproduce Bug
Just try to go behind the walls. In theory it's impossible because there's not space between tiles. Try to go into the enclosed area on the right and see that you can pass through wall, but you cannot find out path.

Observed Result
Object find path through walls hen diagonal movement is enabled.

Expected Result
Find good path, because the pathfinder leads the object to bounce against walls if piloted by physics or other movements.

Affected Browsers
  • Chrome: (YES)

Operating System and Service Pack
Windows 7 SP1

Construct 2 Version ID
Construct 2 Release 223
Last edited by Nabu0001 on Sun Apr 03, 2016 3:02 pm, edited 2 times in total.
B
14
S
4
Posts: 109
Reputation: 1,281

Post » Sun Mar 27, 2016 8:56 pm

Not a bug.

From the manual:

The Cell border property can adjust how cells are marked as obstacle. If the border is larger than 0, then cells close to obstacles but not actually touching may also be marked as obstacles, effectively giving an extra "obstacle border". If the border is negative, cells only just touching an obstacle may not be marked as an obstacle, effectively shrinking the obstacle area inwards.


You have the cell border property set to -1 in your example.
B
9
S
2
Posts: 19
Reputation: 660

Post » Sun Apr 03, 2016 10:43 am

Thank you for reply @juani.

So it is impossible to get right path with pathfinding and cell size the same as tile size ? I don't really understand. In the example the tiles in diagonals in the walls are marked as obstacle, even with -1 cell border.

Also, as you can see in the example, the pathfinder put nodes right on top of declared obstacles. I think it's actually a bug. I modified the project file in example and added a enclosed zone to the right of the layout. See that you can go in there (Pathfinder put a path node on a declared obstacle), but you cannot go out from there.
B
14
S
4
Posts: 109
Reputation: 1,281

Post » Tue Apr 12, 2016 10:54 am

Closing as your pathfinding behavior has diagonals enabled, so it is set to do what you are seeing. If you think there are any other issues please file separate reports.
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,454


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests