pathfinding in 3D

Blitz3D Forums/Blitz3D Programming/pathfinding in 3D

Is pathfinding required? A simple way could be by using waypoints:

If it is a cube in 3D space - like an asteroid in space you can put in 3d waypoints:

............WP...WP...WP..........
..................................
...............OBJECT.............
............WP.O.WP.T.WP..........
...............OBJECT.............
..................................
............WP...WP...WP..........

Basically, like satellites around the world - except they are static - us as many as you like. Your entities will only need to pass through a minimum of 3 waypoints to arrive at the other side of the cube.

The routes could be precalculated, but the decision of which route to take does not (unless you want it to be). When arriving at the cube, aim for a waypoint - throw a random number and off it goes (left, right, top or bottom) - knowing which waypoint to head for next in advance.

The waypoint will know it's opposite waypoint, thus it will be simple to navigate around - when arriving at the opposite waypoint the entity will know it has navigated around the cube.

I hope that makes sense.