RAIN.Motion.Instantaneous.SB_Cohesion Class Reference

SB_Cohesion is a steering behavior that moves and agent toward the "center of mass" of a group. More...

Inheritance diagram for RAIN.Motion.Instantaneous.SB_Cohesion:
RAIN.Motion.Instantaneous.SteeringBehavior

List of all members.

Public Member Functions

 SB_Cohesion (float threshold, float decaycoef)
 Parameterized constructor.
override Steering Steer (Kinematic agent, Kinematic target)
 See SteeringBehavior.
override Steering Steer (Kinematic agent, GameObject[] entities)
 See SteeringBehavior.
override Steering Steer (Agent agent, List< Agent > entities)
 See SteeringBehavior.

Detailed Description

SB_Cohesion is a steering behavior that moves and agent toward the "center of mass" of a group.


Constructor & Destructor Documentation

RAIN.Motion.Instantaneous.SB_Cohesion.SB_Cohesion ( float  threshold,
float  decaycoef 
)

Parameterized constructor.

Parameters:
thresholdOnly consider group members within threshold distance
decaycoefThe rate at which steering forces decay with distance

Member Function Documentation

override Steering RAIN.Motion.Instantaneous.SB_Cohesion.Steer ( Kinematic  agent,
Kinematic  target 
) [virtual]

See SteeringBehavior.

Parameters:
agent
target
Returns:

Reimplemented from RAIN.Motion.Instantaneous.SteeringBehavior.

override Steering RAIN.Motion.Instantaneous.SB_Cohesion.Steer ( Agent  agent,
List< Agent entities 
) [virtual]

See SteeringBehavior.

Parameters:
agent
entities
Returns:

Reimplemented from RAIN.Motion.Instantaneous.SteeringBehavior.

override Steering RAIN.Motion.Instantaneous.SB_Cohesion.Steer ( Kinematic  agent,
GameObject[]  entities 
) [virtual]

See SteeringBehavior.

Parameters:
agent
entities
Returns:

Reimplemented from RAIN.Motion.Instantaneous.SteeringBehavior.