- Home /
Navmesh Agent Custom Controller
Dear Community,
I am trying to write my own script to control navmesh agent on iPhone. I set my char to use finger input as a direction and move 3 units in to that direction by setting the agent.destination. So that it always tries to move to the direction given. But as unity states in the document:
The path result may not become available until after a few frames. Use pathPending to query for outstanding results. If it's not possible to find a valid nearby navmesh position (e.g. Scene has no navmesh) no path is requested. Use SetDestination and check return value if you need to handle this case explicitly.
Because of the above reason, the movement is not smooth and keeps getting interrupted. How can I overcome this problem? What is the best way to manually move a character on a navmesh?
I tried using charactercontroller but it just ignores the navmesh.
Thanks a lot.
Your answer
Follow this Question
Related Questions
How to make AICharacterController able to walk on walls and ceilings? 0 Answers
Are CharacterControllers and NavMeshAgents meant to work together? If so, how? 2 Answers
Player "teleports" on top of NavMeshAgent collider if the Agent is too close 4 Answers
"Nav Mesh Agent" messes up simple prototype player-gameobject. What's up with that? 0 Answers
Is it possible to detect which area of a navmesh a navmesh agent is on? 1 Answer