- Home /
Disable navmesh binding
Hi, I have a NavMesh agent that can be pushed off the edge by a player, but navmesh bind doesn't allow me to do that. How can I, for instance, disable NavMesh binding on collision? Thanks.
Comment
Best Answer
Answer by HarshadK · Oct 20, 2014 at 10:20 AM
When user pushes your enemy (containing the navmesh agent) just disable or remove the NavMeshAgent component from that enemy.
gameObject.GetComponent<NavMeshAgent>.enabled = false;
OR
Destroy(gameObject.GetComponent<NavMeshAgent>);
Then you can apply the force or whatever way you want to throw your enemy off the edge.
Your answer
Follow this Question
Related Questions
How to edit baked navigation for better accuracy? 0 Answers
Baking a nav mesh through a tunnel 3 Answers
NavAgent messing up rotation after using NavLink 0 Answers
Make navmesh agent follow terrain 0 Answers
Unity Navagation Ground Mapping 1 Answer