- Home /
NavMeshAgent Move experience?
Hi everyone,
I'm looking for some brains that have used NavMeshAgents without actually using their path system. In fact, I'm talking about the Move function of the agent. Today I tried to move an agent like I would move a CharacterController, which works quite the same. But I had a couple of problems with it.
The agent does not have a velocity while moving like this. To know, if I reached an edge of the navmesh I calculated the actual distance I travelled since last frame. Is there a more optimal solution?
When walking towards a NavMeshObstacle, the agent doesn't really stop infront, but rather tries to push into it and gets pushed back out. It feels the same as if one moves a rigidbody in Update. Walking against a carving or an edge of the navmesh results in a stop.
My question basically is. How do you use Move on an NavMeshAgent and get to know when it's not moving anymore (or how much it's moving parallel to the obstacle) and get proper Collision detection working (standing still when trying to move into obstacles or edges)?
As always the answer comes right after the question. Setting velocity. But then what is $$anonymous$$ove for? It's the second $$anonymous$$ove function besides rigidbody.$$anonymous$$ovePosition that feels useless now.