- Home /
UnitySteer obstacle avoidance on non Spherical Objects
I was just curious as to whether the obstacle avoidance in unitysteer will only work on spheres? I was wondering if i could for instance place my terrain on the obstacle layer and have it successfully (and realistically) avoid a piece of the terrain sitting in the middle of my path? Thanks in advance for any help!
Answer by Ricardo · Mar 23, 2010 at 11:18 PM
Not as such, and extending it for that would be non-trivial, since obstacle avoidance is all or nothing - either an area or vehicle is to be avoided, or it's not.
Now think about the terrain situation. It is, as a whole, a single object. How would the vehicle know which parts of the terrain to walk on (slopes) and which ones to avoid (cliffs)? Such realtime processing would likely take a lot more effort than what it's worth.
The approach I would recommend is:
- Extend UnitySteer to take into account other obstacle shapes. Rectangles will do.
- Create an editor script that analyzes your terrain offline, based on parameters preset by you, and generates a series of primitive invisible obstacles for the areas that the vehicle should avoid.
That will be both much faster at runtime and simpler to debug.
Your answer
Follow this Question
Related Questions
UnitySteer - Increase turning angle 0 Answers
Robot Simulation 1 Answer
Problems with raycast obstacle avoidance 1 Answer
Most Efficient Method for Steering for Vehicle AI 1 Answer
Using UnitySteer 0 Answers