Creation of a navigation mesh with multiple objects was broken.
(the fix is a oneliner)
How to reproduce:
- go "blender-game"
- create a scene with more multiple objects e.g. one plane with multiple cubes that intersect the plane
- Scene Properites>Naviation Mesh>"Build Navigation Mesh"
> wrong navmesh
Joining all objects into one and creating the navmesh with the same steps as before do work.
Solution:
So there must be something wrong with the intermediate-mesh created for recast.
This creation has two steps.
- create derived mesh with vertices for each object
- create tris with the vertices in these DMs for every object
The problem was that the order got wrong. The DMs were pre(!)pended to the derived mesh list, so it happens that
as soon as you have more than one object you create tris with vertices of another object. Appending the DM in the
list did the job to keep the right order.
As reviewers I added the last three committers.
Greetings, dertom