csharp
public sealed class DefaultFocusServiceKeeps the agent's AiFocus pointed at what a key names.
Remarks
doc 37 § Part 3's DefaultFocus. Its value is that everything downstream reads one place: a rotation task, an aim offset, a head-look constraint and a camera all want "what is this character looking at", and without it each of them takes its own key.
⚠ It clears the focus when the key is unset, and that is the half people leave out. A focus nobody cleared is a guard that keeps staring at where an enemy was after it has forgotten about it — which is a bug the head-look makes visible and the blackboard does not.
Methods (3)
public DefaultFocusService(BlackboardKey key)Keeps the agent's AiFocus pointed at what a key names.
public override void Tick(in BehaviorContext context, Span<byte> state, float delta)Its interval has elapsed.
public override void Leave(in BehaviorContext context, Span<byte> state)
Used by (2)
- FocusTestsVixen.Ai.Nodes.Tests
- WorldNodesVixen.Ai.Nodes