Basically, I’m trying to make it so that agents can’t walk through the tables. I assume the red areas are valid walkable areas, and the clear areas are blocked off.
I don’t understand:
Why there is a clear section connecting one of the table legs to the statue
Why all the table legs are not blocked off
How I could make the ground below the surface of the table blocked off
I usually create appropriately sized boxes at the location of obstacles such as tables, merge them with the ground mesh, and then create a navigation mesh.
Ok I’ve figured out “why all the table legs are not blocked off”: reducing the maxSimplificationError to 0.1 blocks them all off, so they are just too small.
Now I just need to figure out 1) if there’s a way to block off the area below the table and 2) why there’s a line connecting one of the tables to the statue.
EDIT: Figured out the answer to #1, I need to set a walkableHeight > height of table.
Hi!
I’m glad you solved the issue. Here is a tip to see how various parameters affects the navmesh. You can create a debug navmesh which is the calculated mesh actually used to navigate (not your source navmesh). I used to put it slighlty above my source navmesh and make it transparent.
const navmeshdebug = navigationPlugin.createDebugNavMesh(this.scene)
navmeshdebug.position = new Vector3(0, 0.1, 0)
const matdebug = new StandardMaterial('navdebug', this.scene)
matdebug.emissiveColor = new Color3(0, 0, 1)
matdebug.diffuseColor = new Color3(0, 0, 1)
matdebug.alpha = 0.6
navmeshdebug.material = matdebug