- Home /
NavMeshAgent with Collision - Need Help
Hi,
Since I cannot find a solution for multiple agent sizes operating on a single NavMesh, For the bigger units, I am trying to add colliders on them to prevent them from passing through certain areas they shouldn't be able to fit through.
So to clarify, I want the path finding to still resolve, but unit to be restricted by a collider.
I have tried to get this working by adding a box collider, while attaching a rigidBody with Gravity turned off, but this just completely bugs out the path finding. It also sends your character flying if you try place a building with a collider underneath him. Setting the Is Kinematic flag on just makes the unit ignore all other colliders as well.
I realize this solution isn't optimal, but I would like to get the above method working. Am I approaching it in the correct way?
Answer by UNZoOM · Mar 19, 2015 at 10:52 PM
Do you have Unity Pro Version ?
if Yes ,
Then you can resort to http://docs.unity3d.com/Manual/class-OffMeshLink.html
If Not ,
The workaround would be to sub divide your mesh and then generate individual NavMesh'.
Thanks for the comment UNZoO$$anonymous$$ :)
I have explored those solutions, but I always hit a brick wall when implementing that with Nav$$anonymous$$esh Obstacles. Even if I have different Nav$$anonymous$$eshes, the obstacles still cut the same sized block into both Nav$$anonymous$$eshes.
$$anonymous$$y map always starts off completely flat, but has multiple smaller players placing Nav$$anonymous$$esh Obstacles while fewer larger players chase them down, being hindered by the placed Nav$$anonymous$$esh Obstacles.
So I cannot bake anything prior to runtime into the Nav$$anonymous$$esh.
Your answer
