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

AttributesTypeOverridableDescription
weightdoubleyesThe module weight 
maxTurnAngledoublenoThe max turn angle.
followTargetDelayintnoThe number of delay frames used when a target agent is found
stateintnoThe agent state to use when the target agent is found
debug boolnoEnables module debug drawing.
velocityThresholddoublenoif the agent velocity length is smaller than this value the agent direction is not changed.
ignoreNextDirectionalModulesboolyesIf enabled, all next directional modules in the stack will be ignored.
locomotionTargetVelocitydoubleyesWhen 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.
editLocomotionLinearVelocityboolyesIf on, this module will edit the targetLinearVelocity metadata used by the locomotion system.
linearVelocityMindoubleyesThe minimum value for the locomotion linear velocity
linearVelocityMaxdoubleyesThe maximum value for the locomotion linear velocity
negativeLinearVelocityMaxdoubleyesThe maximum value for the locomotion linear velocity when the target is behind the agent
locomotionFalloffRadiusdoubleyesDistance used for decreasing the linear velocity when getting closer to the target. Not used in delta mode
locomotionTargetDistancedoubleyesWhen the agent reaches this distance from the target the linear velocity is set to the minimum value provided
editLocomotionAngularVelocityboolyesIf on, this module will edit the targetAngularVelocity metadata used by the locomotion system.


Copyright © 2017, Toolchefs LTD.