I have a game object with many movement behaviors, each controlled by a script. There is always one and only one behavior running at a given time. All these behaviors uses either CharacterController’s Move() or SimpleMove().
Lately I’ve tried to add a new behavior which required pathfinding. So I’ve added a NavMeshAgent component to my object. This behavior worked fine but it seems that having an active NavMeshAgent component screws up my CharacterController behaviors.
I really don’t know what should I do to solve this. I’ve tried enabling and disabling the NavMeshAgent component by setting the boolean “enabled” property on when I’m using it and off when I’m not, but with no success, it screws up in all sort of ways at moment I toggle the value of the property.
Any thoughts? Maybe I have to change all behaviors to use NavMeshAgent’s Move()? Would this be correct? Are there any other ways?