public struct AiFocusWhat an agent is paying attention to.
Remarks
Unreal's focus, and its value is that everything downstream reads one place. A rotation task, an aim offset, a head-look constraint and a dialogue camera all want "what is this character looking at", and without a component for it each of them takes its own blackboard key and they disagree the first time one branch sets a key another does not.
⚠ An entity or a point, and the entity wins. A focus on an entity follows it as it moves; a focus on a point does not. Two fields rather than a discriminated one because Null already means "there is no entity", so the tag would be a second copy of a fact the value carries.
⚠ [Component] without [DataContract], and it carried both until #1056. Target is an Entity, and an entity id is a dense, reused slot in one running process — written into a .vxscene or a captured world it names a different entity on the way back, or nothing at all, and neither failure says so. CameraTargets, Possessing, PossessedBy, ViewTarget and PredictionSmoothing all keep the same rule for the same reason; VXS0416 is that convention with a compiler behind it, and this type is the one it found that had drifted out of it. A focus that has to survive a save has nothing to hold instead until there is a persistent entity identity — #296. A focus is a decision the tree makes each time it runs, so losing it across a load is the correct outcome anyway.
Fields and properties (3)
Methods (3)
Used by (6)
- AgentTargetVixen.Ai.Nodes
- DefaultFocusServiceVixen.Ai.Nodes
- FocusTestsVixen.Ai.Nodes.Tests
- RotateTowardTestsVixen.Ai.Nodes.Tests
- SceneComponentTestsVixen.Ai.Nodes.Tests
- TypeRegistrationVixen.Ai.Nodes