This system is largely independent of what I have been working on so far, but is far more robust and optimizable. Today, Alex, Mubbasir, and I had a meeting regarding the direction of the project and the implementation of these ideas.
After some consideration of the technical aspects (using Recast vs. Unity navigation meshes, whether we could read the Unity navigation mesh, etc.), we discussed modifying the navigation mesh to allow us to weight waypoints for a constraint given at runtime.
Ideas:
- Weight the waypoints in the navigation mesh to implement constraints (not sure if the weights would be in the Unity system or in our own code)
- Use the A* planner that Francisco is working on
- Use the weights to encourage the planner to give us the path we want
- Reject a path if it violates constraints and try again
- All possible constraints are baked into the navmesh weights
- Dynamic constraints (e.g. based on moving objects) modify waypoint weights on the fly
- We can access Unity's NavMesh data directly using NavMesh.Triangulate.
- NavMeshAgent.SetLayerCost probably allows us to set a layer's cost for a single agent.
- We can cause Unity to break up the NavMesh by putting parts of the terrain on different NavMeshLayers.

No comments:
Post a Comment