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!
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.