#Pathfinding Jank

1 messages · Page 1 of 1 (latest)

stark anvil
#

I’m experiencing this issue where my pathfinding agents think that they’re on the higher ground above them when they’re not leading to them getting stuck running into walls this can also happen on a ledge tho less likely

Notes:
-Using SimplePath + BTrees
-I have a fallback method intended to help agents get unstuck when failing to compute but because there is a path this does not help even with limit reached

Things I’ve attempted:
-Adjusting Agent Height

stark anvil
#

Attempted a small modification to simple path

#

this kinda works but now leads to the pathfinding to brick itself when presed against a ledge

#

rather than a bridge or overhang

civic minnow
#

Just use in built pathfinding provided by the engine that is easier to modify/debug rather than a "template"

stark anvil
#

Like what it does is just streamline the workflow

civic minnow
#

Yes it does but it's harder to modify something if needed

lunar furnace
#

"if result.Position.Y > self._agent.PrimaryPart.Position.Y + 3 then" here you detect any geometry above the NPC

#

meaning the traget waypoint or path segnemt is on a higher floor

#

so just reject paths with impossible vertical transitions

#

and adding ceiling chcekcs is super easy too

undone wigeon
#

use PathfindingService

stark anvil
#

i was kinda able to fix it with this additional check in simple path

#

i do kinda question the viability of a solution like this tho

stark anvil
#

Ok so update

#

i made the decision to remove all the error fallback movement cause it turns out that the fallback movement was responsible for alot more problems than getting stuck in walls

stark anvil