Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 HyperBeeCore · Sep 12, 2015 at 05:57 PM · c#aipathfindingastar

How do I make AI objects not walk on top of each other?

In this screenshot, you can see that all of the AI objects are happily doing their thing. However... ...in this screenshot, they are on top of each other. This happens when they reach their destination, and for some reason gravity will not work for them, so they can't fall down. What is causing this, and how can I stop it?

Thanks! P.S. I'm using the A* Unity Pathfinding Project for the AI.

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

5 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by BowlerBitesLane · Sep 12, 2015 at 07:13 PM

Have you tried adjusting the stopping distance of the NavMeshAgent components of the characters?

http://docs.unity3d.com/ScriptReference/NavMeshAgent-stoppingDistance.html

If that's not enough, you could add a script component that uses the onTriggerEnter method that will GetComponent(NavMeshAgent).Stop() when it detects a collision with another navmeshagent gameObject collider.

http://docs.unity3d.com/ScriptReference/NavMeshAgent.Stop.html

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 HyperBeeCore · Sep 12, 2015 at 08:44 PM 0
Share

This seems to work a LITTLE better, but they still climb on top of each other to avoid each other. EDIT: Just realized this doesn't work at all, because I'm not using navmeshes. I'm using the AStar pathfinding project's components.

avatar image
0

Answer by alvarosaavedra · Jan 14, 2016 at 04:39 PM

Hi @dubstaphone,

I have the same issue, did you solve it? I've been trying changing Rigidbody values (Mass, Drag, Angular Drag) but nothing. I hope you can help me somehow.

Thank you!

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 Polo44 · Oct 29, 2016 at 12:32 PM

Try changing character controller' Steop offset to 1

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 HotActionGames · Dec 14, 2016 at 03:58 AM

Unity is very poor in this regard, best to get rid of physics interactions between moving objects altogether and do your own, you can try all things everyone suggests and believe me, nothing will work, you should just use Triggers and Raycasts and put them on layers that don't react to each other on the built in physics

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 HotActionGames · Dec 14, 2016 at 04:07 AM 1
Share

ps if you change Step Offset to 0 that will stop it but then the character won't climb anything!

avatar image
0

Answer by smoki99 · Jan 09, 2017 at 06:30 AM

For me worked to lower the "Slope Limit" stopping the "character Controllers" to climb on each other.

Sometimes you also have to increase the "Capsule Collider".

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

8 People are following this question.

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

Related Questions

Enemy AI using pathfinding to avoid obstacles 1 Answer

A* all nodes within range 0 Answers

astar pathfinding with groups 0 Answers

A* Pathfinding for Top Down project, how do I make enemyAI to rotate towards waypoints? 0 Answers

How to know which point that AI picked to move to? (A* Pathfinding) 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