Navigation
API > API/Runtime > API/Runtime/HeadMountedDisplay
Inheritance Hierarchy
- UPrimitiveComponent
- UMotionControllerComponent
References
| Module | HeadMountedDisplay |
| Header | /Engine/Source/Runtime/HeadMountedDisplay/Public/MotionControllerComponent.h |
| Include | #include "MotionControllerComponent.h" |
Syntax
UCLASS (Blueprintable, Meta=(BlueprintSpawnableComponent), ClassGroup=MotionController, MinimalAPI)
class UMotionControllerComponent : public UPrimitiveComponent
Variables
| Type | Name | Description | |
|---|---|---|---|
| FVector | AngularVelocityAsAxisAndLength | ||
| uint32: 1 | bDisableLowLatencyUpdate | If false, render transforms within the motion controller hierarchy will be updated a second time immediately before rendering. | |
| bool | bHasAuthority | Whether or not this component has authority within the frame | |
| bool | bPolledHMD_GameThread | ||
| bool | bPolledHMD_RenderThread | ||
| bool | bProvidedAngularVelocity | ||
| bool | bProvidedLinearAcceleration | ||
| bool | bProvidedLinearVelocity | Velocity and acceleration data for the motion controller, if available. | |
| bool | bTracked | Whether or not this component had a valid tracked controller associated with it this frame | |
| ETrackingStatus | CurrentTrackingStatus | The tracking status for the device (e.g. full tracking, inertial tracking only, no tracking) | |
| IMotionController * | InUseMotionController | Cached Motion Controller that can be read by GetParameterValue. Only valid for the duration of OnMotionControllerUpdated. | |
| FVector | LinearAcceleration | ||
| FVector | LinearVelocity | Note: these values are in tracking space, which is also the space relative to the parent of the motioncontroller component, and still need to be converted to unreal space by the TrackingToWorldTransform for use. | |
| FName | MotionSource | Defines which pose this component should receive from the OpenXR Runtime. | |
| int32 | PlayerIndex | Which player index this motion controller should automatically follow | |
| IMotionController * | PolledMotionController_GameThread | ||
| IMotionController * | PolledMotionController_RenderThread | ||
| FCriticalSection | PolledMotionControllerMutex | ||
| FVector | RenderThreadComponentScale | ||
| FTransform | RenderThreadRelativeTransform | ||
| TSharedPtr< FViewExtension, ESPMode::ThreadSafe > | ViewExtension |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UMotionControllerComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
||
| void | CreateRenderState_Concurrent
(
FRegisterComponentContext* Context |
||
| 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 | |||
| void | |||
| bool | IsTracked () |
Whether or not this component had a valid tracked device this frame | |
| void | OnModularFeatureUnregistered
(
const FName& Type, |
||
| void | Blueprint Implementable function for responding to updated data from a motion controller (so we can use custom parameter values from it) | ||
| bool | PollControllerState
(
FVector& Position, |
If true, the Position and Orientation args will contain the most recent controller state | |
| bool | PollControllerState_GameThread
(
FVector& Position, |
||
| bool | PollControllerState_RenderThread
(
FVector& Position, |
||
| void | |||
| void | Serialize
(
FArchive& Ar |
||
| void | SetAssociatedPlayerIndex
(
const int32 NewPlayer |
||
| void | SetTrackingMotionSource
(
const FName NewSource |
||
| void | SetTrackingSource
(
const EControllerHand NewSource |
||
| void | TickComponent
(
float DeltaTime, |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FViewExtension | View extension object that can persist on the render thread without the motion controller component |
Typedefs
| Name | Description |
|---|---|
| FActivateVisualizationComponent | Delegate for activation of XRDeviceVisualizationComponent. |
Constants
| Name | Description |
|---|---|
| OnActivateVisualizationComponent |