ObstacleAvoidanceCollider is the base class for obstacle avoidance colliders. It is an abstract class, serving as a common base upon which specific collider types (sphere, box, etc.) can be added. More...
Public Member Functions | |
ObstacleAvoidanceCollider () | |
Default constructor. | |
void | IgnoreColliders (Collider[] colliders) |
Ignore a list of colliders - usually used to ignore colliders associated with self. | |
void | IgnoreCollider (Collider c) |
Ignore a single collider. | |
void | CullIgnoredColliders () |
Remove any ignored colliders from the current list of obstacles. | |
void | OnTriggerEnter (Collider sensedObject) |
OnTriggerEnter event handler when the collider detects a trigger collision. | |
void | OnTriggerExit (Collider sensedObject) |
OnTriggerExit event handler when a trigger stops colliding. | |
Public Attributes | |
bool | collideWithTerrain = false |
Determine if the collider should include Terrain - usually this will be false, since we expect our AI to collide with Terrain often. | |
Protected Attributes | |
Dictionary< Collider, PhysicalEntity > | obstacles = new Dictionary<Collider, PhysicalEntity>() |
A list of the obstacles currently tracked by this collider. | |
List< Collider > | ignored = new List<Collider>() |
Properties | |
ICollection< PhysicalEntity > | Obstacles [get] |
The current list of obstacles to avoid. | |
abstract float | Radius [get] |
ObstacleAvoidanceCollider is the base class for obstacle avoidance colliders. It is an abstract class, serving as a common base upon which specific collider types (sphere, box, etc.) can be added.
Default constructor.
Remove any ignored colliders from the current list of obstacles.
void RAIN.Sensors.ObstacleAvoidanceCollider.IgnoreCollider | ( | Collider | c | ) |
Ignore a single collider.
c | Collider to ignore |
void RAIN.Sensors.ObstacleAvoidanceCollider.IgnoreColliders | ( | Collider[] | colliders | ) |
Ignore a list of colliders - usually used to ignore colliders associated with self.
colliders | List of colliders to ignore |
void RAIN.Sensors.ObstacleAvoidanceCollider.OnTriggerEnter | ( | Collider | sensedObject | ) |
OnTriggerEnter event handler when the collider detects a trigger collision.
sensedObject | The collider this sensor collided with |
void RAIN.Sensors.ObstacleAvoidanceCollider.OnTriggerExit | ( | Collider | sensedObject | ) |
OnTriggerExit event handler when a trigger stops colliding.
sensedObject | The collider leaving the collision |
Determine if the collider should include Terrain - usually this will be false, since we expect our AI to collide with Terrain often.
Dictionary<Collider, PhysicalEntity> RAIN.Sensors.ObstacleAvoidanceCollider.obstacles = new Dictionary<Collider, PhysicalEntity>() [protected] |
A list of the obstacles currently tracked by this collider.
ICollection<PhysicalEntity> RAIN.Sensors.ObstacleAvoidanceCollider.Obstacles [get] |
The current list of obstacles to avoid.