Jump to content

Navmesh holes/collision erros


Slimwaffle
 Share

Recommended Posts

I am finding that I am getting massive holes in my navmesh. This has caused other problems with my AIs. I have tried everything there is no way to fix it.Then collision errors;

enemies randomly collide with terrain and vanish this sometimes breaks game physics and the player starts doing weird things.

If anything exists below the terrain code stops working on it and if you try to interact with it the game crashes.

Between the navmesh issues being caused by the engine. Its just not even feasible having enemies in my project at all. And that is depressing. 

Error.jpg

Error2.jpg

Link to comment
Share on other sites

  • 4 weeks later...

I fixed one of the collision errors myself. Enemies that sometimes randomly collide with you and cause like a super death. (Using leadwerks default scripts and workshop scripts).

Change this;

function Script:Collision(entity,position,normal,speed)
	if speed>20 then
		self:Hurt(100)
	end
end

To this;

function Script:Collision(entity,position,normal,speed)
	if speed>100 then
		self:Hurt(0)
	end
end

Stuff still randomly collides with you. It just doesn't cause death now.

  • Like 1
Link to comment
Share on other sites

That navmesh looks correct. The parts the terrain sticks out of are too steep to walk on.

You can adjust the generation settings to reduce those long triangles, but other than that it looks right.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Is there any way to adjust the slope setting or make each sqaure smaller? Because now that you have mentioned it. If there is a slope in a single square it creates a hole. Leaving large flat sections with a holes. For example in the pictures above. Around the player controller is flat except the slope into the river bed.

The ideal solution would be having each square way smaller. So that the holes are only on the slope.

Link to comment
Share on other sites

It is possible the navmesh might be hidden a little below the terrain in that case. It is an approximation of the geometry so it doesn't always match the scene exactly.

Fly into the terrain and see if there is anything under there in those spots.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Ok yeah it does show under in the spots where the terrain is above the navmesh plain. In some spots the navmesh plain slopes upwards to cover hills (only on very long gradual slopes) and in others it doesn't and goes under (when slope is not so steep to create a hole but to steep for navmesh plain to raise up.). And on the steep slopes there is just a hole.

Link to comment
Share on other sites

  • Josh locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...