Pathfinding NPC can't jump above 6.5 studs?

  1. What do you want to achieve?
    I want to make a pathfinding NPC.

  2. What is the issue?
    It just stands there in place when the obstacle is higher than 6.5 studs, even though the jump power is set to be able to jump above that.

6.5:
https://gyazo.com/e6288527e9ee77bdbe046cf71eac5419

7:
https://gyazo.com/da99e7c2bbb0f34ba3254358813b0769

  1. What solutions have you tried so far?
    I tried changing the agent parameters, it doesn’t seem to be working.
    I tried to change the HumanoidRootPart size, doesn’t work as well.
    I tried even setting the HipHeight on 100 and what would you know, it didn’t work too.
local PathfindingService = game:GetService("PathfindingService")

local Humanoid	=	script.Parent.Humanoid
local RootPart	=	script.Parent.HumanoidRootPart
local Goal		=	game.Workspace.Goal.Position

local Path		=	PathfindingService:CreatePath()
Path:ComputeAsync(RootPart.Position, Goal)

local Waypoints = Path:GetWaypoints()

for i, Point in ipairs(Waypoints) do
	Humanoid:MoveTo(Point.Position)

	if Point.Action == Enum.PathWaypointAction.Jump then
		Humanoid.Jump = true
	end

	Humanoid.MoveToFinished:Wait()
end

Humanoid:LoadAnimation(script.Chase):Play()

How can I make the NPC be able to jump above obstacles that the jump power can handle?
Thanks for reading.

1 Like

Maybe try changing the jumppower in between 16 and 30?

I don’t think PathfindingService allows the NPC to jump over different heights according to their jumppower yet.

1 Like

I wouldn’t rely on ROBLOX’s PathfindingService for something like this, and instead I would either use a community-made pathfinding module or create my own module using algorithms such as Djikstra’s Algorithm, etc.

https://developer.roblox.com/en-us/recipes/dijkstra-s-algorithm

2 Likes

@DevRelationsTeam

Can this be moved to Features Request? This feels like a feature that should be added to Pathfinding Service.

1 Like