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
0
Question by GlitchCrew · Apr 10, 2018 at 04:43 AM · ainavmeshnavmeshagentpathfinding

NavMesh Agent glitches in trees

Sometimes my navmesh agents get stuck in trees like this:

Alt text

I set agent's destination only once through script. So far I have tried changing agent's paremeters, turning on/off auto traverse off mesh, auto repath and also changing navmesh surface voxel size. Does anyone have an idea what can cause this thing? Here are my agent settings:

alt text and surface settings alt text

navagentsettings.png (15.7 kB)
navsurfacesettings.png (24.4 kB)
Comment
Add comment
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

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by tormentoarmagedoom · Apr 10, 2018 at 08:41 AM

Good day.

How many NavMeshAgents do you have in the scene? Somethimes, if too many navmeshagents, all ttrying to recalculate paths, make some of them act strange, but only for some seconds...

I have some experience with navmesh system, and when i see this gif, i think the object is trying to reach the tree, like Destination==ThatTree.

So, confimr whats the destination, and how many active navmesh agents you have in the scene.

Bye!

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 GlitchCrew · Apr 10, 2018 at 08:57 AM 0
Share

Hello!

The maximum amount of agents active at the same time is around 50-60, doesn't sound like too many to me. Plus I don't call SetDestination on them every frame, but only when I need it, so I don't think thats the issue. The destination is not a tree but some completely different place on the other part of the scene.

And they can never get out of this state, the only way to stop it right now is to manually move them away from trees which is obviously not an option.

Anyways, thanks for trying to help!

avatar image tormentoarmagedoom GlitchCrew · Apr 10, 2018 at 11:47 AM 1
Share

And maybe the height of the agent is collisiong with the tree leafs, change the naveshagent height (or do higher palm trees) to check if is this.

Lets see if is that....

avatar image GlitchCrew tormentoarmagedoom · Apr 10, 2018 at 03:55 PM 0
Share

Leaves have no navmesh geometry at all.

Show more comments
avatar image
0

Answer by Rahd · Apr 11, 2018 at 02:34 AM

select trees and make them unwalkable . scale the tree collider to cover the roots , obstacle avoidance need to be smaller so play with the Radius .and btw make it low quality

Comment
Add comment · Show 4 · 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 GlitchCrew · Apr 11, 2018 at 03:48 AM 0
Share

Trees ARE unwalkable, because they have unwalkable Nav$$anonymous$$esh$$anonymous$$odifier. Every tree has a box collider (you can see it in the gif), that only covers a trunk and not leaves. I've tried changing radius and quality but that didn't help.

avatar image Rahd · Apr 11, 2018 at 06:08 AM 0
Share

Again change the tree collideralt text

avatar image GlitchCrew Rahd · Apr 12, 2018 at 08:34 AM 0
Share

Like I said, navmesh agents can pass through any collider if it doesn't have navmesh obstacle component attached and navmesh geometry allows it. Changing tree collider did not help.

avatar image Rahd · Apr 12, 2018 at 10:01 AM 0
Share

The gif shows that the obstacle avoidance Collider is moving around the tree collider you have not provided detail about your script or AI , my Ai has a navmesh agents and avoids colliders , and can go off the baked navigation plane. what i see is the AI is trying to go around the tree ignoring the collider because it's too small . or some kind of a bug that makes the Ai bugs out . i had this with doors inside houses the Ai will keep doing the same thing in the gif , the way i fixed it was to make the baked nav mesh more precise , and obstacle avoidance tweaks. i'm just trying to help . one thing can clear this out , is to debug the path of the AI . by drawing the path in the editor .

avatar image
0

Answer by undersun · Mar 01, 2019 at 07:45 PM

Had similar issue, only workaround I found for it is to set destination every frame.

Comment
Add comment · 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

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

136 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 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

Ignoring or overruling a NavMeshAgent destination 0 Answers

Possible to edit the movement of NavMeshAgent ? 2 Answers

Editing NavMesh Paths? 0 Answers

Horde of NavMeshAgents - stops to recalculate path. 4 Answers

Find the closest point of an Invalid or Partial path 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