NavMesh Agent changing Model Rotation
See the attached images but basically I have an enemy game object that has it's rotation change completely on start for seemingly no reason at all. This only happens with a NavMeshAgent is attached to the gameObject. I've tried a few different things to get this fixed including:
agent.updateRotation = false;
rotationValues = new Vector3(-90, 270, 0);
gameObject.transform.rotation = Quaternion.Euler(rotationValues);
Answer by arthurion98 · Jul 21, 2017 at 10:48 AM
I had the same problem. I simply put agent.updateUpAxis = false;
and it seems to solve it.
Hi @arthurion98 I've placed this line and get an error: "Nav$$anonymous$$eshAgent does not contain a definition for "updateUpAxis" and no method..." Where did you place this line in your code?
Work perfect i use this line to avoid collider and model rotation when my agent starts to walk on a wall after offlink to object with navmesh surface that switch his axes system
Answer by omarefg · Aug 25, 2018 at 03:40 PM
Try activating the Static checkbox. ,Try activating the static checkbox for the model.
Your answer
Follow this Question
Related Questions
Is there anyway to avoid a StackOverflow 0 Answers
how can I implement navmesh in this script? 0 Answers
Navmeshs and Trees 1 Answer
NavMeshAgent not teleport on y axis 0 Answers