0

Unity has video tutorials about this where it claims to simply add NavMeshSurface component to an object and rotate the object to any orientation to get behaviors like walking on walls, etc.

However, this does not work for all orientations. Here is what happens when I try it out for a random surface. Note that I have a script that rebakes the NavMesh for every left mouse button click.

if(Input.GetMouseButtonDown(0))
    surface.BuildNavMesh();

Link to view my video

I have a scene in HoloLens2 where walls are generated at runtime and I want a spider to walk on them. So naturally, I want NavMeshes to get generated on walls irrespective of their orientation. Please help.

Add comment

  • 196 degrees? Are you sure the navmesh isnt on the other side? – BugFinder Mar 30 '20 at 21:05
  • @BugFinder, I thought the same too. But unfortunately, it is not on the other side. I have shown this in the video. – Siddhant Shenoy Mar 30 '20 at 23:17
  • I watched the video I dont remember seeing the other side.. they also only demonstrate a 90 degree angle between the walls, the angles on your objects seem a litle weird I'd start with the floor at 0 so its flat, and try recreating what they do – BugFinder Mar 30 '20 at 23:19
  • @BugFinder, that is exactly what I did. I started out with the floor in the correct place and the NavMesh was getting baked correctly. Then I started rotating it and rebaking it. You should try it yourself. In my video, you can see at 0:47 where I go behind the floor and you can see that there is no NavMesh. – Siddhant Shenoy Mar 30 '20 at 23:32
  • Ive seen instances where it just doesnt show because it draws bad, are you sure this isnt the case? – BugFinder Mar 30 '20 at 23:35
  • @BugFinder, yes I am sure that is not the case. Can you define 'draws bad'? Is there a decent way to check if the NavMesh has been generated? The only way right now is the blue highlight, correct? I don't see any in that case. I have tried this umpteen number of times now. Maybe you can try it out yourself. – Siddhant Shenoy Mar 30 '20 at 23:42
  • the blue highlight can "not show" a bit like z clashing and no, not now i should have been in bed 2 hours ago but I was on a coding roll – BugFinder Mar 30 '20 at 23:42

0 Answers0