Pathfinding, unwanted smoothing/taking shortcuts

Get help using Construct 2

Post » Tue Aug 13, 2013 12:08 pm

so my character is always taking shortcuts while following a path when on longer straight lines and as a result clips through unwanted areas.
i tried all kinds of different pathfinding behavior settings but nothing really works.

heres a .capx:
https://dl.dropbox.com/s/db3ypotdozt6sr5/catch.capx
sorry for the filezize.. too lazy to replace the graphics

PS: you have to refresh the page for the mouse to find a new random path.. didn't implement a loop yetAlanSmithee2013-08-13 12:48:29
B
6
Posts: 20
Reputation: 904

Post » Tue Aug 13, 2013 12:20 pm

Tracking seemed to work better when I disabled Diagonals on the Mouse
B
43
S
13
G
59
Posts: 1,779
Reputation: 35,731

Post » Tue Aug 13, 2013 12:47 pm

kind of, looks sh*tty though..
and it doesn't solve the problem that the mouse is not following its waypoints. still takes the same kind of shortcuts.
i made the green walls reach as far into the room as they do to kind of force the mouse to enter straight into the holes but sometimes it just runs straight over the borders.
B
6
Posts: 20
Reputation: 904

Post » Tue Aug 13, 2013 4:15 pm

Then my best guess is
"If you ask the pathfinding behavior to pathfind to a destination inside an obstacle, it will simply find the nearest clear cell and pathfind to there instead."
Perhaps some of the nodes spawn inside objects?
B
43
S
13
G
59
Posts: 1,779
Reputation: 35,731

Post » Wed Aug 14, 2013 4:30 am

it always pathfinds to one of the blue hole sprites so there should alsways be a way..

nobody has experienced this behavior before?
is there maybe some simpler technique than pathfinding?
B
6
Posts: 20
Reputation: 904

Post » Thu Aug 15, 2013 2:14 pm

bump maybe?
B
6
Posts: 20
Reputation: 904


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, Cool Gamez, marcoscodas and 10 guests