Follow agent

Follow agent

The follow agent module makes your agent travel towards another agent location. 

This module should be used in conjunction with the ProximityMetadata or similar modules.

This module will search for the "targetAgentId" metadata on each agent of this group, when this metadata is found the module will change this agent direction to point towards the target agent. The state of the agent is also changed as soon as the target agent is found.




Attributes

Attributes

Type

Overridable

Description

Attributes

Type

Overridable

Description

weight

double

yes

The module weight 

maxTurnAngle

double

no

The max turn angle.

followTargetDelay

int

no

The number of delay frames used when a target agent is found

state

int

no

The agent state to use when the target agent is found

debug 

bool

no

Enables module debug drawing.

velocityThreshold

double

no

if the agent velocity length is smaller than this value the agent direction is not changed.

ignoreNextDirectionalModules

bool

yes

If enabled, all next directional modules in the stack will be ignored.

locomotionTargetVelocity

double

yes

When using the locomotion system, if the target agent got closer than the locomotionTargetDistance then the locomotion velocities are not changed until the target agent velocity magnitude becomes greater than this value.

editLocomotionLinearVelocity

bool

yes

If on, this module will edit the targetLinearVelocity metadata used by the locomotion system.

linearVelocityMin

double

yes

The minimum value for the locomotion linear velocity

linearVelocityMax

double

yes

The maximum value for the locomotion linear velocity

negativeLinearVelocityMax

double

yes

The maximum value for the locomotion linear velocity when the target is behind the agent

locomotionFalloffRadius

double

yes

Distance used for decreasing the linear velocity when getting closer to the target. Not used in delta mode

locomotionTargetDistance

double

yes

When the agent reaches this distance from the target the linear velocity is set to the minimum value provided

editLocomotionAngularVelocity

bool

yes

If on, this module will edit the targetAngularVelocity metadata used by the locomotion system.




Copyright © 2017, Toolchefs LTD.