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
1
Question by NdavN · May 10, 2017 at 01:14 PM · navmeshagentnavigationobstacle avoidance

NavMeshAgent: How to set perception radius?

Hi All,

I think I've found something that is not only relevant for me but also other users. I'm working on a simulation where a boat is evading other ships on a river. I'm using the default Unity Pathfinding and obstacle avoidance for now, but the obstacle avoidance is not really meeting my requirements.

Since some ships are travelling way faster than my boat, the boat is occasionally to 'late' to steer away and gets rammed. In other words; the local obstacle avoidance (Unity uses RVO, Reciprocal Velocity Obstacles - not to be confused with RVO2, which is basically OCRA, Optimal Reciprocal Collision Avoidance) kicks in too late to avoid the collision.

alt text

Simply put, RVO works by predicting in time and distance, so it sounds logical to be able to tweak both of these parameters, right? (https://en.wikipedia.org/wiki/Velocity_obstacle)

Now I have already found out that there is a setting called NavMesh.avoidancePredictionTime which lets you tune the so called 'time horizon' of the agents sailing around.

I'm wondering, is there also a setting that lets you set something like 'Perception Radius' or 'Sensing radius'? So something to specify the distance in which the local avoidance kicks in?

By the way, yes, I've experimented with agent radius, speeds, navmeshes, etc...

Thanks in advance!

unity-rvo-final.gif (460.7 kB)
Comment
Add comment · Show 4
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 NdavN · May 12, 2017 at 06:31 PM 0
Share

I'm actually not sure about the statement I made earlier; stating that Unity uses RVO, and not RVO2. Has anyone more information about this? The Unity Documentation says: " Unity is using reciprocal velocity obstacles (RVO) to predict and prevent collisions. " - https://docs.unity3d.com/$$anonymous$$anual/nav-InnerWorkings.html

But other sources say something else: " There is a great library out there called the RVO2 library. It has been used in both UD$$anonymous$$ and in Unity. " - https://arongranberg.com/2012/09/local-avoidance-pt-3/

avatar image NdavN · May 16, 2017 at 08:56 AM 0
Share

Anyone any ideas?

avatar image Bluk NdavN · May 17, 2017 at 09:31 AM 0
Share

I'm actually a bit confused on why Nav$$anonymous$$esh.avoidPredictionTime is not enough for your problem, since you then have the time and velocity, hence the distance (relative to each agent) of when it should start avoiding.

Also as far as I know there is no way to specify the distance or avoidanceRadius that you seek.

I guess you could just program it yourself if you really need it.

avatar image NdavN Bluk · May 17, 2017 at 12:59 PM 0
Share

I think you are right, because when I increase the agent's speed, while keeping the same Nav$$anonymous$$esh.avoidancePredictionTime, the circle surrounding the agent visualizing that very horizon gets bigger as well! Thanks for your input. I guess the only variables to play with then are the speed and that predictiontime.

0 Replies

· Add your reply
  • Sort: 

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to make the enemy avoid each other 1 Answer

NavmeshAgent and NavmeshObstacle and Bake don't work with AICar 0 Answers

Unity NavMesh obstacle avoidance? 0 Answers

Instantiating a nav mesh obstacle makes all current nav mesh agents try to walk through a wall. 2 Answers

Enemies using navmesh are bumping each other through solid objects 1 Answer


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