Hey,
im currently experimenting with unity nav meshes. It works like it should but i ran into some limitations with it.
Im trying to navigate a vehicle to a destination and the nav mesh finds the shortest path. But the shortest path is not always the best because there are three additional things that should be considered.
- Slope (If the path contains steep slopes the vehicle will become really slow as it has to climb)
- Narrow path (If the path is really narrow the vehicle has to drive slow to not fall off a bridge etc)
- Angles of corners (Step angles at corners lead to a massive slowdown of the vehicle as it has to slow done to be able to maneuver the corner without getting to far away from the path.
In this scenarios it would be maybe suitable to drive a longer path with is flatter and wider so we can maintain maximum speed and reach the target faster.
It would be nice if i could.
- Add different costs for different slopes. For example 0-15°: 1 | 15°-25°: 2 | > 25° : 3
- Add different costs for narrower paths. For example > 8m: 1 | < 8m : 4
- Add different costs for steeper angles. For example < 25°: 1 | < 45°: 2 > 45°: 8
With that the vehicle could drive more efficiently.
Would be something like this possible and how would i do it. Thank you