#Roblox pathfinding finds paths through gaps that are too narrow and the NPC gets stuck

1 messages · Page 1 of 1 (latest)

final sage
#

I am tyring to use roblox pathfinding on NPCs but it keeps returning a path that the npc cannot fit through, rather than returning NoPath. Leading to the npcs getting stuck every time

tropic idol
final sage
#

local ModelSize = Rig:GetExtentsSize()
local AgentRadius = math.max(ModelSize.X, ModelSize.Z) * 0.5
local AgentHeight = ModelSize.Y

local Path = C.PathfindingService:CreatePath({
    AgentRadius = AgentRadius,
    AgentHeight = AgentHeight,
    AgentCanJump = false,
    AgentCanClimb = false,
})
tropic idol
final sage
#

I have tried changing the agent radius alot but no matter what it is the same result

#

unless I make the rig really big in which case it always returns no path even for obviously clear paths

tropic idol
#

weird

#

can you show the map you're using this on?

final sage
#

Not really. Does it matter how many parts/how big the map is?

tropic idol
#

i haven't done much pathfinding

#

is the map made out of parts or are there unions or meshes?

#

maybe its struggling with those

final sage
#

its alot of models and meshes

steady fulcrumBOT
#

studio** You are now Level 4! **studio