Preventing pathfinding overlap onto solids?

Get help using Construct 2

Post » Thu Jun 30, 2016 3:22 pm

In my project, pathfinding occasionally results in enemies overlapping walls (where they are not meant to). What setting for pathfinding cell size/border should I use for the enemies?

Thanks in advance! :D
B
17
S
5
Posts: 30
Reputation: 1,136

Post » Fri Jul 01, 2016 8:53 pm

the cell size define the "resolution" of the path-finding algorithm : larger cells mean less precision, but better performances.
the cell border is the right setting to change in your case : if you add 10 to the cell border, cells which are 10 pixels away from an obstacle will be considered blocked. So if enemies are overlapping walls, consider increasing this value.
Before doing that, be sure that the polygon detection of your walls and your enemies are fine.
B
8
S
1
Posts: 76
Reputation: 628

Post » Sun Jul 31, 2016 9:17 am

There is a Show Collision mesh toggle button under VIEW ->display in your construct 2 editor if that helps any...
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, dimitriosfl, InfiniteRockets, jkmalau, newday198913 and 17 guests