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 /
  • Help Room /
avatar image
1
Question by Mnemonic7 · Aug 25, 2017 at 10:56 PM · aiupdatenavmeshnavmeshagent

navmesh agent not working after update to 2017.1

my navmesh agent won't move after i updated unity from 5.6 to 2017.1 i dont get an error or something it just wont move.

this is all i have in that script.

     public void Start() {
         agent = GetComponent<NavMeshAgent> ();
     }
 
     public void Update() {
         agent.SetDestination (nextpos);
     }

thanks.

btw, all it does is rotate in circles really slow even though my angular speed is 420

Comment
Add comment · Show 1
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 Baraff · Sep 10, 2017 at 01:39 AM 0
Share

Did you find an answer to this. I am having the same problem here on 2017.1p1.

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by vgofaizen · Nov 13, 2017 at 02:11 AM

I started getting the same warning on dynamically instantiated prefabs after updating to 2017.2.0f3. I worked around this bug by disabling the NavMeshAgent on my prefab and setting its enabled flag to true within the Start function of the prefab.

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 SixTimesNothing · Nov 27, 2017 at 09:32 AM 0
Share

This worked for me, thanks. Also on 2017.2.0f3.

Though it's an annoying workaround to need to implement, so I hope it gets fixed soon.

Here's my code (JS, but simple enough to convert to C#):

 var nav$$anonymous$$eshHit : UnityEngine.AI.Nav$$anonymous$$eshHit;
 UnityEngine.AI.Nav$$anonymous$$esh.SamplePosition(rPos, nav$$anonymous$$eshHit, 1f, UnityEngine.AI.Nav$$anonymous$$esh.AllAreas);
 var npcObject : GameObject = Instantiate(npcPrefab, nav$$anonymous$$eshHit.position, rRot);
 var nma : UnityEngine.AI.Nav$$anonymous$$eshAgent = npcObject.GetComponent(UnityEngine.AI.Nav$$anonymous$$eshAgent);
 nma.enabled = true;
 nma.Warp(nav$$anonymous$$eshHit.position);

Note that rPos and rRot are the predefined spawn position and rotation Vector3 values for the Instantiated prefab which has a disabled Nav$$anonymous$$eshAgent component attached.

avatar image
0

Answer by retraffic · Sep 14, 2017 at 07:18 AM

I have the same problem, however, I'm getting a lot of warnings "Failed to create agent because it is not close enough to the NavMesh" that I didn't get before.

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
avatar image
0

Answer by Baraff · Sep 14, 2017 at 10:20 AM

My problem showed no errors at all but the navmesh agents that work correctly under any other version of Unity, including 2017.1.0p5 just simply stopped working. They would no longer move to correct targets and often would run around in circles. It actually turned out that they always said they were not attached to a navmesh. Baking the navmesh again made no difference. I gave up and simply went back to 2017.1.0p5 where they work fine. I guess Unity will fix it at some point.

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 retraffic · Sep 14, 2017 at 10:23 AM 0
Share

I've made some progress with my problem. It turned out only a few agents were too far away, but the others still didn't work.

I played around with the Obstacle Avoidance radius and as soon as it's equal or larger that 0.25 they worked again. $$anonymous$$ine were all set to lower though, so setting the angle on all agents to 0.25 fixed my problems.

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

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

NavMeshAgent isn't chasing the player 0 Answers

NavMeshLink don't work in correctly in certain area 0 Answers

NavMeshSurface or NavMeshAgent agentTypeId can't be changed on runtime 0 Answers

How can I check the destination outside the navmesh? 1 Answer

NavmeshAgent too far away after Unity Update 2 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