Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by castor · Nov 15, 2016 at 05:50 PM · errorunity5navmeshagentpath

Unity 5.4.2.f2 new ERROR msg - A passive NavMeshAgent is expected to have no path. But this one has 2 polygons

Just upgrade to Unity and getting this error message:

"A passive NavMeshAgent is expected to have no path. But this one has 2 polygons."

There is no extra info or line of code or anything: alt text

What does it mean? How do I fix it?

passiveagent.jpg (9.8 kB)
Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image painkiller2007 · Nov 16, 2016 at 07:29 AM 0
Share

I have also been getting same error in the Unity3d beta v5.5.0b11

Its such a strange error. I tried a couple of things. It does not make it go away and the AI behaves strangely because of this error I think.

avatar image castor painkiller2007 · Nov 16, 2016 at 03:01 PM -1
Share

What you wrote is a comment, not an answer to the actual question. Can you remove/change it please?

avatar image Gojira96 · Nov 16, 2016 at 11:25 AM 0
Share

@castor

Happens to me as well from 5.4.2. AI runs in circles, ragdolls fly into the air. Only seems to happen if object with nav mesh is at Y position less than 0.

avatar image castor Gojira96 · Nov 16, 2016 at 03:01 PM -1
Share

What you wrote is a comment, not an answer to the actual question. Can you remove/change it please?

avatar image Gojira96 castor · Nov 16, 2016 at 03:38 PM 0
Share

There you go, no need for down vote.

2 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by RuneSP · Nov 16, 2016 at 10:55 PM

I've been getting this error lately as well. In my case it seemed to happen because my enemy character with the Nav Mesh Agent and an Animator component was being moved by the animators animation (root motion), without the nav mesh agent having a destination.

Either disabling the root motion or making sure the character has a destination whenever an animation was moving it, seemed to solve it.

After this I continued to get the error on clients in multiplayer. This was due to the destination only getting set on the server, creating a ClientRPC function to set the nav mesh agent destination on the clients as well, solved it.

Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image painkiller2007 · Nov 22, 2016 at 05:16 AM 0
Share

Wow!! Thanks a lot, it is indeed the root motion which makes that error.

I was having a lot of trouble trying to figure out the source of this issue. But now, it makes sense. Thanks again.

avatar image castor · Dec 08, 2016 at 08:14 PM 0
Share

I think you nailed the problem but I can't figure out a solution in my specific case. I can't disable the root motion, so how can I "$$anonymous$$ake sure the character has a destination whenever an animation is moving it"?

avatar image RuneSP · Dec 08, 2016 at 08:21 PM 0
Share

Using the setDestination method on the Nav$$anonymous$$eshAgent. As long as the character is in an idle animation, its not a problem if it doesnt have a destination (as its not moving). But whenever the character is a an animation that moves it and it doesnt have a destination set by the setDestination method, the error will occur.

avatar image castor RuneSP · Dec 08, 2016 at 08:36 PM 0
Share

I don't think that is the actual problem even though the SetDestination is a possible solution. In my case, I don't want/need to SetDestination() since I don't need a new path while the actor is being moved and it feels messy to have to define one. I have a feeling it's related to using any navmesh function that expects a path (e.g. ResetPath()) when there is none but I can't nail the actual problem.

avatar image PNUMIA-Rob · Jan 27, 2017 at 05:16 PM 0
Share

An absolutely excellent description of the actual problem, with a clear solution -- way to go RuneSP!! #twoThumbsUp :D

avatar image Lycanite · Mar 25, 2017 at 03:55 PM 0
Share

Thanks, this was my problem too! I use root motion to move things and use the NavmeshAgent's steeringTarget as a destination to move towards. In order to keep the agent's pathing up to date I manually update the agent's nextPosition, however doing that when there is no path causes this problem so all I have to do is only move it when there is a path.

avatar image
1

Answer by castor · Dec 13, 2016 at 07:17 PM

So I found what was the issue in my case, and just like both of yours, it's a unique situation that the damn LogWarning is very very much lacking in detail.

I had a NavMeshCarve surface on the floor and one of my agents was on top of it. The new NavmeshCarve behaviour has changed and EVEN if the carving is disabled, the agent will be pushed away from it. This meant that my agent since he was on top of this carved mesh was automatically setting a new destination and path to get away from the mesh. This was causing the error since I manually control all the navmesh agent movement and wasn't allowing him to move.

To properly understand WHEN the error happens in my project, I added the following:

 //Do this when the agent is supposed to be disabled
 if (playerProperties.actorAgent.hasPath) {
     Debug.LogError(transform.name + " - Agent is assigning himself a new path!");
 }

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image BCook99 · Jan 26, 2017 at 12:32 AM 0
Share

In my case, I have certain behaviors that move my NPCs around without using the nav mesh agent, and sometimes they go into areas without nav mesh. Even though my nav mesh agent was stopped and had no path, it was doing as you said.

The answer for me was simply to ensure I completely disable the nav mesh agent when I am not using it for navigation. This keeps it from interfering with my other behaviors that are moving the character.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

69 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to set my ADB path ? pls. 3 Answers

Unity 5 - submeshes don't work as before 1 Answer

Navmesh two agents going to the same possition 0 Answers

Programmmed Animation (making transform move to vectors with code) 0 Answers

NavMeshAgent dont find the right way on runtime build NavMesh ,Agents didn´t walk right on a runtime generated NavMesh 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges