Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Z2City · Jan 03, 2015 at 06:18 PM · navmesh

NavMesh Fidgeting

I created a gameObject, and used Navmesh. the Navmesh is working fine, but as it is coming towards the target, it keeps on fidgeting like crazy. It isn't rotating, but it just keeps shifting around. Is there anything that I can do to stop it from doing so?

Comment
Add comment · Show 2
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 Mmmpies · Jan 03, 2015 at 08:02 PM 0
Share

That isn't normal Nav$$anonymous$$esh behavior what code have you got so we can see if something being passed to the navmesh agent that's causing it.

avatar image Z2City · Jan 03, 2015 at 10:08 PM 0
Share
 using UnityEngine;
 using System.Collections;
 
 public class SampleAgent : $$anonymous$$onoBehaviour {
 
     public Transform target;
     Nav$$anonymous$$eshAgent agent;
     // Use this for initialization
     void Start () {
         agent = GetComponent<Nav$$anonymous$$eshAgent> ();
     
     }
     
     // Update is called once per frame
     void Update () {
         agent.SetDestination (target.position);
     }
 }
 

Could it also be because I added a Rigidbody?

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by jpthek9 · Jan 03, 2015 at 10:11 PM

Make sure you take off your rigidBody or if you need one for collision detection, check every single constraint. That way your character's movement isn't affected by 2 seperate controllers trying to get it to what they think is the correct position. What's probably happening is your character's rigidBody wants to pull it down with gravity but the navmesh controller doesn't.

Comment
Add comment · Show 2 · 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 Z2City · Jan 03, 2015 at 10:16 PM 0
Share

Thanks, but I'm relatively new, and so I did not get what you just said. I'm also trying to use a Hover $$anonymous$$otor sort of thing, so is there a way to let me use Rigidbody only for collision and gravity, and have navmesh not affect those two?

avatar image jpthek9 · Jan 04, 2015 at 02:21 AM 0
Share

Yes! Don't worry about gravity or physics collisions - the Nav$$anonymous$$esh will keep you stuck to the ground. On your character, look for the Rigidbody component. There should be something that says 'Use Gravity'. Uncheck that then look for the 'Constraints' section of the rigidbody. Check everything. Now you're good!

avatar image
1

Answer by ThomasMarsh · Jan 04, 2015 at 01:42 AM

I was having a similar issue and I found that making the NavMesh itself smoother by messing with the bake settings, decreasing the radius of the NavMeshAgent (in the properties of the NavMeshAgent component), and removing any physics colliders from the object the NavMeshAgent is in improved the smoothness of the navigation.

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

28 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

Related Questions

Unity 3.5: Is there a way to access a NavMeshAgent's current path? 1 Answer

Navmesh Teleporting (With Server) 1 Answer

How to sample a point on a navMesh Agent path 0 Answers

Nav Mesh Agent 1 Answer

How can I access the scene's NavMesh in code? 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