UMotionControllerComponent

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

HeadMountedDisplay

Header

/Engine/Source/Runtime/HeadMountedDisplay/Public/MotionControllerComponent.h

Include

#include "MotionControllerComponent.h"

Syntax

class UMotionControllerComponent : public UPrimitiveComponent

Variables

Name Description

Public variable

uint32: 1

 

bDisableLowLatencyUpdate

If false, render transforms within the motion controller hierarchy will be updated a second time immediately before rendering.

Public variable

bool

 

bDisplayDeviceModel

Used to automatically render a model associated with the set hand.

Public variable

ETrackingStatus

 

CurrentTrackingStatus

The tracking status for the device (e.g. full tracking, inertial tracking only, no tracking)

Public variable

UStaticMesh ...

 

CustomDisplayMesh

A mesh override that'll be displayed attached to this MotionController.

Public variable

TArray< UMateri...

 

DisplayMeshMaterialOverrides

Material overrides for the specified display mesh.

Public variable

FName

 

DisplayModelSource

Determines the source of the desired model.

Protected variable

IMotionControll...

 

InUseMotionController

Cached Motion Controller that can be read by GetParameterValue. Only valid for the duration of OnMotionControllerUpdated.

Public variable

FName

 

MotionSource

Public variable

int32

 

PlayerIndex

Which player index this motion controller should automatically follow

Constructors

Name Description

Public function

UMotionControllerComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function

FVector

 

GetHandJointPosition

(
    int jointIndex,
    bool& bValueFound
)

Protected function

float

 

GetParameterValue

(
    FName InName,
    bool& bValueFound
)

Returns the value of a custom parameter on the current in use Motion Controller (see member InUseMotionController). Only valid for the duration of OnMotionControllerUpdated.

Public function Const

EControllerH...

 

GetTrackingSource()

Public function Const

bool

 

IsTracked()

Whether or not this component had a valid tracked device this frame

Protected function

void

 

OnMotionControllerUpdated()

Blueprint Implementable function for reponding to updated data from a motion controller (so we can use custom paramater values from it)

Protected function

void

 

RefreshDisplayComponent

(
    const bool bForceDestroy
)

Public function

void

 

SetAssociatedPlayerIndex

(
    const int32 NewPlayer
)

Public function

void

 

SetCustomDisplayMesh

(
    UStaticMesh* NewDisplayMesh
)

Public function

void

 

SetDisplayModelSource

(
    const FName NewDisplayModelSource
)

Public function

void

 

SetShowDeviceModel

(
    const bool bShowControllerModel
)

Public function

void

 

SetTrackingMotionSource

(
    const FName NewSource
)

Public function

void

 

SetTrackingSource

(
    const EControllerHand NewSource
)

Overridden from UActorComponent

Name Description

Protected function Virtual

void

 

CreateRenderState_Concurrent

(
    FRegisterComponentContext* Con...
)

Used to create any rendering thread information for this component

Public function Virtual

void

 

InitializeComponent()

Initializes the component.

Public function Virtual

void

 

OnComponentDestroyed

(
    bool bDestroyingHierarchy
)

Called when a component is destroyed

Public function Virtual

void

 

OnRegister()

Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.

Protected function Virtual

void

 

SendRenderTransform_Concurrent()

Called to send a transform update for this component to the rendering thread

Public function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction* T...
)

Function called every frame on this ActorComponent.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PreEditChange

(
    FProperty* PropertyAboutToChan...
)

This is called when a property is about to be modified externally

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Enums

Name

Description

Private enum

EModelLoadStatus

Constants

Name

Description

CustomModelSourceId

Deprecated Variables

Name Description

Public variable

EControllerHand

 

Hand_DEPRECATED

DEPRECATED (use MotionSource instead) Which hand this component should automatically follow

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss