- Home /
Navmeshagent falls through the navmesh plane. Weirdest issue I have ever seen
So I have a prefab of an enemy with a navmeshagent and when I spawn it it works fine. I took that prefab, copied it and placed it back into the prefabs folder. If I use the copy, it falls through, while the original is fine.
How is this even possible? They are the exact same object!
Any help would be appreciated!
Cheers,
Nils
Answer by FortisVenaliter · Jan 27, 2016 at 07:24 PM
When you spawn it, do you place it on the NavMesh, and ensure that the NavMeshAgent is grounded?
I recommend sampling the NavMesh to determine a good location, then using the NavMeshAgent's Warp function to move it there.
Answer by onefreeshot · Feb 17, 2020 at 07:37 PM
I know it's been some time but I am leaving this for anyone coming across this issue like myself.
The reason why it did not work for me was because my object did not have the pivot point at its base and to solve that I had to adjust the Base Offset value on the NavMeshAgent component on the said object.
Here is a link to the man page of NavMeshAgent where I saw the picture with the cylinder of the object and that of the NMAgent which led me to believe it was the issue and helped me finally solve it.
Your answer
Follow this Question
Related Questions
NPC's bump into eachother trying to reach a position 1 Answer
How do I get a navmesh agent to stop at the edge of a collider? 0 Answers
OnTriggerEnter not activating with NavMesh movement 2 Answers
NavMesh on collision dectection activate,On collision activate navMesh 0 Answers
How to make whole navmesh agent avoid carves rather then center of it? 0 Answers