I’m making a simple 3d ‘game’ where you can walk through a building that I made in Blender.
At the moment I’m using the collision detection that comes from ‘Octree.fromGraphNode()’. It works but is slow on my laptop.
In the past, waypoints was the cheapiest method: a series of connected points representing ‘safe positions’. You can still use this approach today, but it leads to several limitations (i.e. it always solve using the same route, among other things). Navmesh on the other hand is way more fluid, and you can use it directly with you current collision detection approach (plus octree in your case).
Using a walkable navigation mesh:
You can create your Navmesh in a dcc tool like Blender, in the same scale, position and orientation as the original building (keeping the same origin too), and export it like a regular mesh (i.e. gltf). If you prefer the CLI way, follow this post. At last, load the mesh, the material doesn’t matter since it only will be used for the collision detection.
The great @donmccurdy wrote the uber usefull three-pathfinding library, which takes points from the navmesh and computes a new path for your character movement -among others things, I strongly recommend giving it a try
Eventually I manually made a navmesh in Blender for the building but it didn’t work as expected. Sometimes i’d walk on one triangle and then the player got teleported to another. I tried generating a navmesh in Unity but the quality was not good.
Now I just use an even more simplyfied collision model which has around 6k triangles. It works good and I figured if I want to increase performance Id probably do something with the other 3d buildings that are loaded into the scene.
Will post something this weekend I hope.