IPersonBase
UINTERFACE(BlueprintType)
class UPersonBase : public UInterface { GENERATED_BODY() };
class AR51SDK_API IPersonBase
{
GENERATED_BODY()
// methods: BlueprintCallable, BlueprintNativeEvent
};
Implements: UInterface (Unreal Engine)
One tracked person. This is what the USkeletonConsumer lookup methods return, as TScriptInterface<IPersonBase>. It is implementable in both C++ and Blueprint; every method is a BlueprintNativeEvent, so from C++ you call it through the generated Execute_ thunk (see Calling convention).
PersonId(GetId) — the mocap system's per-person id. The key forGetPersonByPersonIdandPersonIdToCharacterBPMap.DeviceId(GetDeviceId) — the associated headset/device id.EntityId/EntityDisplayNamecome from an external system and are not onIPersonBasedirectly — they live on theUSkeletonConsumermapping APIs (GetPersonByEntityId,EntityIdToCharacterBPMap, …) and are used to choose which character Blueprint to spawn.- The active person is the one whose headset/camera is currently in use (
USkeletonConsumer::GetActivePerson). TheOnActivePersonChangedevent passes an empty string ("") when no skeleton is associated with the headset.
Method summary
All methods are BlueprintCallable, BlueprintNativeEvent and const.
| Method | Returns | |
|---|---|---|
GetId | FString | BlueprintNativeEvent |
GetDeviceId | FString | BlueprintNativeEvent |
GetCharacter | UAR51Character* | BlueprintNativeEvent |
GetModel | AActor* | BlueprintNativeEvent |
GetLastUpdateTime | float | BlueprintNativeEvent |
GetTimeFromLastUpdate | float | BlueprintNativeEvent |
IsTracked | bool | BlueprintNativeEvent |
→ Full descriptions in Method details below.
Calling convention
Because every method is a BlueprintNativeEvent, do not call Obj->GetCharacter() directly from C++. Call the static Execute_ thunk the interface generates, passing the underlying UObject*:
// A TScriptInterface<IPersonBase> comes back from the consumer.
TScriptInterface<IPersonBase> Person = Consumer->GetActivePerson();
if (UObject* Obj = Person.GetObject()) // null when no active person
{
// BlueprintNativeEvent → call through Execute_:
UAR51Character* Char = IPersonBase::Execute_GetCharacter(Obj);
const FString Id = IPersonBase::Execute_GetId(Obj);
if (Char && IPersonBase::Execute_IsTracked(Obj))
{
const FVector Head = Char->GetHeadPosition(); // UE world space, cm
}
}
In Blueprint the same methods appear as ordinary nodes off a TScriptInterface<IPersonBase> (or Person Base reference) pin — no Execute_ wrapper needed.
Method details
GetId
FString GetId() const; // IPersonBase::Execute_GetId(Obj)
The unique PersonId — the mocap system's per-person id. Stable for the life of the tracked person; the key used by GetPersonByPersonId and PersonIdToCharacterBPMap. See Id semantics above.
PersonIdGetDeviceId
FString GetDeviceId() const; // IPersonBase::Execute_GetDeviceId(Obj)
The associated device/headset id. Distinct from PersonId — the device this person is wearing/using, when one is associated.
GetCharacter
UAR51Character* GetCharacter() const; // IPersonBase::Execute_GetCharacter(Obj)
The mocap-driven UAR51Character component for this person — the usual hop to read joint state (head, wrists, hand joints). The consumer drives this component every frame; you read from it.
if (UObject* Obj = Person.GetObject())
{
if (UAR51Character* Char = IPersonBase::Execute_GetCharacter(Obj))
{
const FVector L = Char->GetLeftWristPosition(); // UE cm
const FVector R = Char->GetRightWristPosition();
}
}
GetModel
AActor* GetModel() const; // IPersonBase::Execute_GetModel(Obj)
The spawned actor representing the person in the level (the AAR51CharacterActor that hosts the character component). Use it for actor-level operations — attachment, visibility, world transform.
GetLastUpdateTime
float GetLastUpdateTime() const; // IPersonBase::Execute_GetLastUpdateTime(Obj)
The timestamp (seconds) at which this person's skeleton was last updated. Pair with GetTimeFromLastUpdate to detect staleness.
GetTimeFromLastUpdate
float GetTimeFromLastUpdate(float currentTime) const; // IPersonBase::Execute_GetTimeFromLastUpdate(Obj, Now)
Elapsed time since the last update — effectively currentTime - GetLastUpdateTime(). Use it to gate logic on stale persons (e.g. mirror the consumer's InactivePersonMaxSeconds / HidePersonMaxSeconds thresholds).
GetLastUpdateTimeIsTracked
bool IsTracked() const; // IPersonBase::Execute_IsTracked(Obj)
Whether this person is currently tracked. A person can persist briefly while tracking is lost (until the consumer's removal thresholds elapse), so check this before trusting positional reads.
true while the person is actively trackedif (UObject* Obj = Person.GetObject(); Obj && IPersonBase::Execute_IsTracked(Obj))
{
UE_LOG(LogTemp, Log, TEXT("Tracking %s"), *IPersonBase::Execute_GetId(Obj));
}
See also
USkeletonConsumer— returns persons fromGetActivePerson/GetPersonByPersonId/GetPersonByEntityId/GetPersonByIdUAR51Character— the driven character component returned byGetCharacterAAR51CharacterActor— the spawned model actor returned byGetModel- Class index — all Unreal SDK types