Getting this error?

(Jarrod) #1

I’m getting this error, how do I fix it?

“GetRemainingDistance” can only be called on an active agent that has been placed on a NavMesh.
UniRPG.Chara2_ProNavi:CurrentSpeed() (at Assets/UniRPG/Default Assets/Character2/Scripts/Navigators/Chara2_ProNavi.cs:103)
UniRPG.Chara2_Base:CurrentMovementSpeed() (at Assets/UniRPG/Default Assets/Character2/Scripts/Controllers/Chara2_Base.cs:103)
UniRPG.Chara2_AnimCtrl:LateUpdate() (at Assets/UniRPG/Default Assets/Character2/Scripts/Animation Controllers/Chara2_AnimCtrl.cs:87)

(Marshall Heffernan) #2

Sounds like you have someone with a NavMeshAgent Component (player, NPC, enemy) in your scene that is not standing on the NavMesh.

(Jarrod) #3

How do I get them to stand on the navmesh?? I don’t understand ahaha

(Marshall Heffernan) #4

If you put a NavMeshAgent component on a GameObject (player, NPC, enemy) it must never leave the NavMesh.

  1. open NavMesh window

  2. make sure everything you want collision with (walls, tables, chairs, the floor) is marked as Static.

  3. Bake NavMesh

  4. Ensure anything with a NavMeshAgent component is standing on it.

(Jarrod) #5

I don’t get it? I have no objects or anything placed on the terrain at the moment, I don’t know what to do…

(Jarrod) #6

Nevermind, I managed to fix it, thanks a lot man!! :slight_smile: