Forum Discussion
genii.393095
9 months agoHonored Guest
"SetDestination" can only be called on an active agent that has been placed on a NavMesh Error
I am trying to build an AR game for the Quest 3. The Navmesh is baked on when the current room loads. I am attempting to spawn objects into my scene.
I have two different objects that spawn. The first spawns fine. The second always create this error
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
UnityEngine.AI.NavMeshAgent:SetDestination (UnityEngine.Vector3)
Ghost:Update () (at Assets/XR/Scripts/Ghost.cs:56)
My Ghosts are not spawning to valid positions.
Line 56 in the Ghost.cs file is this
agent.SetDestination(targetPosition);
Here is a link to the complete script
The intention is to have them spawn outside the wall of the current room.
Replies have been turned off for this discussion
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 3 months ago
- 9 months ago