To make an object float above other objects?

I am trying to make one object with a Nav Mesh Agent float above other objects with a Nav Mesh Agent.

All objects are using the same Nav Mesh, however the floating one has a greater Base Offset. Although the object is floating, it will not float above other objects which have a lesser Base Offset.

How could I best achieve the results I am looking for? Should this floating object use a separate Nav Mesh in the air, or is there a better solution?

How about making only visual object float in the air but having nav agent actually moving on the ground?

Thanks @AndreiKubyshkin , I haven't explained myself very well.

One object is flying above the map, its nav mesh agent extends to the ground. As the agent is on the ground (along with moving ground objects), it is trying to move around the ground objects, not just flying above them. As the flying objects nav mesh uses the same floor as the slower ground objects, the flying objects nav mesh pushes the ground objects out of the way.

My problem is trying to find a way to have the flying objects ignore the ground objects and just overtake them from above without pushing them.

1 Like

I can think of two solutions.

First is to use separate layer (or floor) of navMesh, just as you said.

Second is not use navMesh at all. For example in my game there’re helicopters. They are flying above the trees and building and don’t need any pathfinding to fly around. And to avoid collisions with higher obstacles like single mountains they’re using raycasting.

1 Like

Thank you @AndreiKubyshkin , I’ll have my flying objects rely on raycasting objects in front of itself. That’s been really helpful.

1 Like