Skip to main content

ActiveCircleReposition

A class in Root.Township, Alta.Intelligence.

Server: running action that walks a creature to a spot rotated around its target (and optionally backwards), to reposition mid fight. Settings come from AgentCircleRepositionSettings.

Constructors​

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

Methods​

MemberWhat it is
override void Update(bool hasTarget)Keeps the creature facing the target if IsFacingTarget is set.
protected override void OnStart()Finds the destination and starts walking there for the set duration, or finishes on the next frame if there's no valid spot.
2 private and internal methods
MemberWhat it is
private void FinishOrCancel(IActiveAction finished)Stops the walker and director and clears the forward facing flag.
private bool GetPosition(Vector3 topicPosition, Vector3 targetPosition, out Vector3 intendedPosition)Works out the destination by rotating the offset from the target by RepositionAngle, then raycasts for walls and ground. False if no ground is found.