csharp
public sealed class RotateTowardTaskTurns to face a key, or the agent's focus, at a rate.
Remarks
doc 37 § Part 3's RotateToward. Yaw only, and deliberately: an agent that pitched to look at something at its feet would lie down, and the vertical half of "looking at" belongs to an aim offset or a head-look constraint rather than to the character's own transform.
Methods (4)
public RotateTowardTask(BlackboardKey key, float degreesPerSecond = 360, float tolerance = 5)Turns to face a key, or the agent's focus, at a rate.
public void Start(in AgentContext context, Span<byte> state)Begins. Called once before the first Tick, on a zeroed span.
public ActionStatus Tick(in AgentContext context, Span<byte> state, float delta)Advances it.
public void Abort(in AgentContext context, Span<byte> state)Stops it early. The span is zeroed afterwards; this is for what is outside it.
Used by (2)
- RotateTowardTestsVixen.Ai.Nodes.Tests
- WorldNodesVixen.Ai.Nodes