Pathfinding struggles with elevations despite having CanJump set to true

Hey. I’m currently working on my horror game and I was trying to make the AI from scratch as it’s been a while since I made it and I was sure I could improve on it. I’ve encountered an issue though.

The AI works fine, follows me normally and doesn’t stutter which I’m very glad about.
image

The problem occurs whenever the player gets on an elevated surface (whether it be by walking through stairs or climbing). The path just refuses to pathfind up despite there obviously being multiple paths it could follow. It gives up, starts throwing errors and doesn’t do anything until I jump down.

{
			AgentRadius = 1,
			AgentHeight = 1,
			AgentCanJump = true,
			AgentCanClimb = true,
			WaypointSpacing = 2,
			Costs = {
				Planks = 0,
				YesRake = 0,
				Climb = 0,
				NoRake = math.huge
			}}

here’s my agent params. CanJump and CanClimb are true, I even made custom collision with the house for the monster and placed some trusses but most of the time the monster just ignores the trusses (haven’t had it climb them yet despite numerous tests) and gets bugged right as the player walks up the stairs.

What can I do?

Apparently it was the navmesh being very bad. I had to divide the stairs into very small invisible steps and now it works much better.

1 Like

Glad you solved it, have fun with ur game!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.