Pre-Calculate Network of Waypoints (Determine Visible Objects)

Hi all,

I’ve been trying to pre-calculate a network of waypoints in a 3D environment.
This network is consists of 30+ waypoints that should only be accessible for navigation if not hidden behind other 3D objects. So I need to determine which objects are visible from each waypoint POV.

The thing is: To run raycasting on mobile at run-time eats too much performance, so the ideal is to pre-calculate this network, and save it as config file. If I don’t need to even load physics library on the player, even better.

I started to look into Ammo.js but it doesn’t look to be simple (1.5Mb of code).
Does someone have an easy method/algorithm to perform this task?

Thank you!

For good navigation, Nav Mesh today is the way to go.
Path finding within navmesh can be done analytically, so wont require any physics library.
But you need to build navmesh, either by hand or some automated process, which usually consists of processing geometry that is walkable, and then generatic simplified floor representation. This been solved in many places and there is a lot of docs around on how to approach this. It is not small thing though.

You could start from pre-making nav mesh using 3d modeling tools. They often have some plugins to make them.

2 Likes