Hello! Hopefully this is the correct place to ask a question. I am trying to use a layered grid graph to handle multiple layers and it work great as long as the different layers are caused by different collision meshes. When I have a single collision mesh with multiple levels, however, the ray only returns a single collision. What would be the best way to go about addressing this (the mesh is procedural and decimating isn’t really an option at this point).
/// <summary>
/// Returns all hits when checking height for position.
/// Warning: Does not work well with thick raycast, will only return an object a single time
///
/// Warning: The returned array is ephermal. It will be invalidated when this method is called again.
/// If you need persistent results you should copy it.
///
/// The returned array may be larger than the actual number of hits, the numHits out parameter indicates how many hits there actually were.
/// </summary>
The plane on the left is a different mesh and both the top and bottom are detected by the A*. The cubes on the left are a combined mesh with the terrain below and only the top is detected by A* (Minecraft-esque voxels).