Navigation
Unreal Engine C++ API Reference > Runtime > HeadMountedDisplay
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UMotionControllerComponent
References
Module | HeadMountedDisplay |
Header | /Engine/Source/Runtime/HeadMountedDisplay/Public/MotionControllerComponent.h |
Include | #include "MotionControllerComponent.h" |
Syntax
class UMotionControllerComponent : public UPrimitiveComponent
Variables
Type | Name | Description | |
---|---|---|---|
uint32: 1 | bDisableLowLatencyUpdate | If false, render transforms within the motion controller hierarchy will be updated a second time immediately before rendering. | |
ETrackingStatus | CurrentTrackingStatus | The tracking status for the device (e.g. full tracking, inertial tracking only, no tracking) | |
TObjectPtr< UPrimitiveComponent > | DisplayComponent | ||
FXRDeviceId | DisplayDeviceId | ||
EModelLoadStatus | DisplayModelLoadState | ||
IMotionController * | InUseMotionController | Cached Motion Controller that can be read by GetParameterValue. Only valid for the duration of OnMotionControllerUpdated. | |
FName | MotionSource | Defines which pose this component should receive from the OpenXR Runtime. | |
int32 | PlayerIndex | Which player index this motion controller should automatically follow | |
int32 | PreEditMaterialCount |
Constructors
Type | Name | Description | |
---|---|---|---|
UMotionControllerComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
bool | GetAngularVelocity
(
FRotator& OutAngularVelocity |
If the motion tracking system provides angular velocity at this time OutAngularVelocity will be that velocity in deg/s in unreal world space and the function will return true. | |
FVector | GetHandJointPosition
(
int jointIndex, |
||
bool | GetLinearAcceleration
(
FVector& OutLinearAcceleration |
If the motion tracking system provides linear acceleration at this time the vector will be that acceleration in cm/(s^2) in unreal world space and the function will return true. | |
bool | GetLinearVelocity
(
FVector& OutLinearVelocity |
If the motion tracking system provides linear velocity at this time the vector will be that velocity in cm/s in unreal world space and the function will return true. | |
float | GetParameterValue
(
FName InName, |
Returns the value of a custom parameter on the current in use Motion Controller (see member InUseMotionController). Only valid for the duration of OnMotionControllerUpdated. | |
FName | |||
EControllerHand | |||
bool | IsTracked () |
Whether or not this component had a valid tracked device this frame | |
void | OnDisplayModelLoaded
(
UPrimitiveComponent* DisplayComponent |
Callback for asynchronous display model loads (to set materials, etc.) | |
void | Blueprint Implementable function for responding to updated data from a motion controller (so we can use custom parameter values from it) | ||
void | RefreshDisplayComponent
(
const bool bForceDestroy |
The following private properties/members are now deprecated and will be removed in later versions. | |
void | SetAssociatedPlayerIndex
(
const int32 NewPlayer |
||
void | SetTrackingMotionSource
(
const FName NewSource |
||
void | SetTrackingSource
(
const EControllerHand NewSource |
Overridden from UActorComponent
Type | Name | Description | |
---|---|---|---|
void | CreateRenderState_Concurrent
(
FRegisterComponentContext* Context |
Used to create any rendering thread information for this component | |
void | Initializes the component. | ||
void | OnComponentDestroyed
(
bool bDestroyingHierarchy |
Called when a component is destroyed | |
void | OnRegister () |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. | |
void | Called to send a transform update for this component to the rendering thread | ||
void | TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
void | BeginDestroy () |
Called before destroying the object. | |
void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
void | PreEditChange
(
FProperty* PropertyAboutToChange |
This is called when a property is about to be modified externally | |
void | Handles reading, writing, and reference collecting using FArchive. |
Enums
Type | Name | Description | |
---|---|---|---|
EModelLoadStatus |
Typedefs
Name | Description |
---|---|
FActivateVisualizationComponent | Delegate for activation of XRDeviceVisualizationComponent. |
Constants
Name | Description |
---|---|
CustomModelSourceId | |
OnActivateVisualizationComponent |
Deprecated Variables
Type | Name | Description | |
---|---|---|---|
bool | bDisplayDeviceModel | bDisplayDeviceModel is deprecated. Please use the XRDeviceVisualizationComponent for rendering instead. | |
TObjectPtr< UStaticMesh > | CustomDisplayMesh | CustomDisplayMesh is deprecated. Please use the XRDeviceVisualizationComponent for rendering instead. | |
TArray< TObjectPtr< UMaterialInterface > > | DisplayMeshMaterialOverrides | DisplayMeshMaterialOverrides is deprecated. Please use the XRDeviceVisualizationComponent for rendering instead. | |
FName | DisplayModelSource | DisplayModelSource is deprecated. Please use the XRDeviceVisualizationComponent for rendering instead. |
Deprecated Functions
Type | Name | Description | |
---|---|---|---|
void | SetCustomDisplayMesh
(
UStaticMesh* NewDisplayMesh |
SetCustomDisplayMesh is deprecated. Please use the XRDeviceVisualizationComponent for rendering instead. | |
void | SetDisplayModelSource
(
const FName NewDisplayModelSource |
SetDisplayModelSource is deprecated. Please use the XRDeviceVisualizationComponent for rendering instead. | |
void | SetShowDeviceModel
(
const bool bShowControllerModel |
SetShowDeviceModel is deprecated. Please use the XRDeviceVisualizationComponent for rendering instead. |