UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UMotionControllerComponent Class Reference

#include <MotionControllerComponent.h>

+ Inheritance diagram for UMotionControllerComponent:

Classes

class  FViewExtension
 

Public Member Functions

virtual HEADMOUNTEDDISPLAY_API void Serialize (FArchive &Ar) override
 
virtual HEADMOUNTEDDISPLAY_API void InitializeComponent () override
 
 DECLARE_MULTICAST_DELEGATE_OneParam (FActivateVisualizationComponent, bool)
 

Static Public Attributes

static HEADMOUNTEDDISPLAY_API FActivateVisualizationComponent OnActivateVisualizationComponent
 

Protected Member Functions

virtual HEADMOUNTEDDISPLAY_API void CreateRenderState_Concurrent (FRegisterComponentContext *Context) override
 
virtual HEADMOUNTEDDISPLAY_API void SendRenderTransform_Concurrent () override
 
HEADMOUNTEDDISPLAY_API void OnMotionControllerUpdated ()
 
HEADMOUNTEDDISPLAY_API float GetParameterValue (FName InName, bool &bValueFound)
 
HEADMOUNTEDDISPLAY_API FVector GetHandJointPosition (int jointIndex, bool &bValueFound)
 
HEADMOUNTEDDISPLAY_API bool GetLinearVelocity (FVector &OutLinearVelocity) const
 
HEADMOUNTEDDISPLAY_API bool GetAngularVelocity (FRotator &OutAngularVelocity) const
 
HEADMOUNTEDDISPLAY_API bool GetLinearAcceleration (FVector &OutLinearAcceleration) const
 
HEADMOUNTEDDISPLAY_API bool PollControllerState (FVector &Position, FRotator &Orientation, float WorldToMetersScale)
 
HEADMOUNTEDDISPLAY_API bool PollControllerState_GameThread (FVector &Position, FRotator &Orientation, bool &OutbProvidedLinearVelocity, FVector &OutLinearVelocity, bool &OutbProvidedAngularVelocity, FVector &OutAngularVelocityAsAxisAndLength, bool &OutbProvidedLinearAcceleration, FVector &OutLinearAcceleration, float WorldToMetersScale)
 
HEADMOUNTEDDISPLAY_API bool PollControllerState_RenderThread (FVector &Position, FRotator &Orientation, float WorldToMetersScale)
 
HEADMOUNTEDDISPLAY_API void OnModularFeatureUnregistered (const FName &Type, class IModularFeature *ModularFeature)
 

Protected Attributes

IMotionControllerInUseMotionController
 
bool bTracked
 
bool bHasAuthority
 
bool bProvidedLinearVelocity
 
bool bProvidedAngularVelocity
 
bool bProvidedLinearAcceleration
 
FVector LinearVelocity
 
FVector AngularVelocityAsAxisAndLength
 
FVector LinearAcceleration
 
IMotionControllerPolledMotionController_GameThread
 
IMotionControllerPolledMotionController_RenderThread
 
bool bPolledHMD_GameThread
 
bool bPolledHMD_RenderThread
 
FCriticalSection PolledMotionControllerMutex
 
FTransform RenderThreadRelativeTransform
 
FVector RenderThreadComponentScale
 
TSharedPtr< FViewExtension, ESPMode::ThreadSafeViewExtension
 

Member Function Documentation

◆ CreateRenderState_Concurrent()

void UMotionControllerComponent::CreateRenderState_Concurrent ( FRegisterComponentContext Context)
overrideprotectedvirtual

◆ DECLARE_MULTICAST_DELEGATE_OneParam()

UMotionControllerComponent::DECLARE_MULTICAST_DELEGATE_OneParam ( FActivateVisualizationComponent  ,
bool   
)

◆ GetAngularVelocity()

bool UMotionControllerComponent::GetAngularVelocity ( FRotator OutAngularVelocity) const
protected

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. Note that it is not difficult to rotate a controller at more than 0.5 or 1 rotation per second briefly and some mathmatical operations(such as conversion to quaternion) lose rotations beyond 180 degrees or 360 degrees.. In some cases that is OK becuase the resulting final rotation is the same, but in some cases it would generate incorrect results. If angular velocity is unavailable it will return false.

◆ GetHandJointPosition()

FVector UMotionControllerComponent::GetHandJointPosition ( int  jointIndex,
bool bValueFound 
)
protected

◆ GetLinearAcceleration()

bool UMotionControllerComponent::GetLinearAcceleration ( FVector OutLinearAcceleration) const
protected

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. If acceleration is unavailable it will return false.

◆ GetLinearVelocity()

bool UMotionControllerComponent::GetLinearVelocity ( FVector OutLinearVelocity) const
protected

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. If velocity is unavailable it will return false.

◆ GetParameterValue()

float UMotionControllerComponent::GetParameterValue ( FName  InName,
bool bValueFound 
)
protected

◆ InitializeComponent()

void UMotionControllerComponent::InitializeComponent ( )
overridevirtual

◆ OnModularFeatureUnregistered()

void UMotionControllerComponent::OnModularFeatureUnregistered ( const FName Type,
class IModularFeature ModularFeature 
)
protected

◆ OnMotionControllerUpdated()

HEADMOUNTEDDISPLAY_API void UMotionControllerComponent::OnMotionControllerUpdated ( )
protected

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

◆ PollControllerState()

bool UMotionControllerComponent::PollControllerState ( FVector Position,
FRotator Orientation,
float  WorldToMetersScale 
)
protected

If true, the Position and Orientation args will contain the most recent controller state

◆ PollControllerState_GameThread()

bool UMotionControllerComponent::PollControllerState_GameThread ( FVector Position,
FRotator Orientation,
bool OutbProvidedLinearVelocity,
FVector OutLinearVelocity,
bool OutbProvidedAngularVelocity,
FVector OutAngularVelocityAsAxisAndLength,
bool OutbProvidedLinearAcceleration,
FVector OutLinearAcceleration,
float  WorldToMetersScale 
)
protected

◆ PollControllerState_RenderThread()

bool UMotionControllerComponent::PollControllerState_RenderThread ( FVector Position,
FRotator Orientation,
float  WorldToMetersScale 
)
protected

◆ SendRenderTransform_Concurrent()

void UMotionControllerComponent::SendRenderTransform_Concurrent ( )
overrideprotectedvirtual

◆ Serialize()

void UMotionControllerComponent::Serialize ( FArchive Ar)
overridevirtual

Member Data Documentation

◆ AngularVelocityAsAxisAndLength

FVector UMotionControllerComponent::AngularVelocityAsAxisAndLength
protected

◆ bHasAuthority

bool UMotionControllerComponent::bHasAuthority
protected

Whether or not this component has authority within the frame

◆ bPolledHMD_GameThread

bool UMotionControllerComponent::bPolledHMD_GameThread
protected

◆ bPolledHMD_RenderThread

bool UMotionControllerComponent::bPolledHMD_RenderThread
protected

◆ bProvidedAngularVelocity

bool UMotionControllerComponent::bProvidedAngularVelocity
protected

◆ bProvidedLinearAcceleration

bool UMotionControllerComponent::bProvidedLinearAcceleration
protected

◆ bProvidedLinearVelocity

bool UMotionControllerComponent::bProvidedLinearVelocity
protected

◆ bTracked

bool UMotionControllerComponent::bTracked
protected

Whether or not this component had a valid tracked controller associated with it this frame

◆ InUseMotionController

IMotionController* UMotionControllerComponent::InUseMotionController
protected

◆ LinearAcceleration

FVector UMotionControllerComponent::LinearAcceleration
protected

◆ LinearVelocity

FVector UMotionControllerComponent::LinearVelocity
protected

◆ OnActivateVisualizationComponent

UMotionControllerComponent::FActivateVisualizationComponent UMotionControllerComponent::OnActivateVisualizationComponent
static

◆ PolledMotionController_GameThread

IMotionController* UMotionControllerComponent::PolledMotionController_GameThread
protected

◆ PolledMotionController_RenderThread

IMotionController* UMotionControllerComponent::PolledMotionController_RenderThread
protected

◆ PolledMotionControllerMutex

FCriticalSection UMotionControllerComponent::PolledMotionControllerMutex
protected

◆ RenderThreadComponentScale

FVector UMotionControllerComponent::RenderThreadComponentScale
protected

◆ RenderThreadRelativeTransform

FTransform UMotionControllerComponent::RenderThreadRelativeTransform
protected

◆ ViewExtension

TSharedPtr< FViewExtension, ESPMode::ThreadSafe > UMotionControllerComponent::ViewExtension
protected

The documentation for this class was generated from the following files: