Skip to main content

ActiveAgentRotateClose

A class in Root.Township, Alta.Intelligence.

Server: running action that moves a creature in to its target, then circles the target at the reached distance in a random direction. Settings come from AgentCircleCloserSettings.

Constructors​

MemberWhat it is
ActiveAgentRotateClose()Creates an ActiveAgentRotateClose with default values.

Fields​

1 private and internal field
MemberWhat it is
private Vector3 rotationAngleThe circling axis, up or down, picked at random on start.

Methods​

MemberWhat it is
protected override void OnStart()Sets up the speed multiplier and picks clockwise or anticlockwise at random.
protected override void Update(Vector3 position, Vector3 targetPosition, Vector3 toTargetXZ, Vector3 toEdge, float flatDistance)Moves straight in while still outside the reached distance, otherwise steps around the target at CircleSpeed.