Abilities & interactions
Everything interactive in the framework is built from four component base classes and one data struct. Understanding these five pieces is enough to read the rest of the codebase.
Abilities act. Interactions are acted upon. An ability lives on the player: on the pawn
(BPC_PawnAbility), on a motion controller (BPC_ControllerAbility), or on an arbitrary actor
(BPC_ActorAbility). An interaction (BPC_Interaction) lives on the object being manipulated.
Abilities trace, poll input and decide what to do; interactions declare what may be done to them
and respond.
Capability is presence. An object becomes grabbable by having BPC_Interaction_Grip attached,
selectable by having BPC_Interaction_Select, and so on. There is no registration step and no
central manager to update — adding the component is the whole opt-in.
Vetoes are interfaces. If an object needs conditional behaviour, it implements the matching
interface (Interface_Grip, Interface_Select, Interface_Gaze) and returns an override flag
alongside the answer. Not implementing the interface means "yes, always", so the common case stays
free of boilerplate.
Source Info carries identity. Every interaction call receives an ST_SourceInfo describing the
pawn that acted, the component that acted, and its identifier. A target therefore knows who touched
it without ever referencing a pawn class, which is what keeps interactable actors reusable across
VR, desktop and mobile.
The four base classes
| Class | Lives on | Used for |
|---|---|---|
BPC_PawnAbility | The pawn | Abilities that belong to the player as a whole: select, gaze, teleport, HUD, spatial UI |
BPC_ControllerAbility | A motion controller actor | Abilities that belong to one hand: grip, laser, locomotion, hand UI |
BPC_ActorAbility | Any actor | Abilities on non-player actors, such as overlap probes |
BPC_Interaction | The target object | What may be done to this object |
Reading an interaction stack
Take grip as the example. BPC_PawnAbility_Grip on the pawn coordinates; the per-hand
BPC_ControllerAbility_Hand_Grab polls input and traces; BPC_Interaction_Grip on the target
declares grippability, and its subclasses _Pickup, _Latch, _Latch_Drag and _Latch_Physics
specialise the behaviour. BPC_Socket_Grip components mark where hands may attach, and
Interface_Grip on the owning actor can veto.
Every other stack — select, gaze, overlap, teleport — follows the same shape.