Navigation
API > API/Runtime > API/Runtime/HeadMountedDisplay
Motion Controller device interface
NOTE: This intentionally does NOT derive from IInputDeviceModule, to allow a clean separation for devices which exclusively track motion with no tactile input NOTE: You must MANUALLY call IModularFeatures::Get().RegisterModularFeature( GetModularFeatureName(), this ) in your implementation! This allows motion controllers to be both piggy-backed off HMD devices which support them, as well as standing alone.
| Name | IMotionController |
| Type | class |
| Header File | /Engine/Source/Runtime/HeadMountedDisplay/Public/IMotionController.h |
| Include Path | #include "IMotionController.h" |
Syntax
class IMotionController : public IModularFeature
Derived Classes
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~IMotionController() |
IMotionController.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FeatureName | FName | IMotionController.h | |
| HeadSourceId | FName | IMotionController.h | |
| HMDSourceId | FName | IMotionController.h | |
| LeftHandSourceId | FName | Explicit source names | IMotionController.h |
| RightHandSourceId | FName | IMotionController.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool AttachInputMappingContexts
(
const TSet< TObjectPtr< class UInputMappingContext > >& InputMappingContexts |
Add input mapping contexts to the motion controller. | IMotionController.h | |
void EnumerateSources
(
TArray< FMotionControllerSource >& SourcesOut |
Called to request the motion sources that this IMotionController provides | IMotionController.h | |
bool GetControllerOrientationAndPosition
(
const int32 ControllerIndex, |
Returns the calibration-space orientation of the requested controller's hand. | IMotionController.h | |
bool GetControllerOrientationAndPosition
(
const int32 ControllerIndex, |
Returns the calibration-space orientation of the requested controller's hand. | IMotionController.h | |
bool GetControllerOrientationAndPositionForTime
(
const int32 ControllerIndex, |
Returns the calibration-space orientation of the requested controller's hand at the specified time for potentially improved temporal precision, particularly fetching the controller transform when a button was pressed on a platform that provides sub-frame timing for button presses. | IMotionController.h | |
ETrackingStatus GetControllerTrackingStatus
(
const int32 ControllerIndex, |
Returns the tracking status (e.g. not tracked, intertial-only, fully tracked) of the specified controller | IMotionController.h | |
float GetCustomParameterValue
(
const FName MotionSource, |
Returns a custom names parameter value | IMotionController.h | |
bool GetHandJointPosition
(
const FName MotionSource, |
IMotionController.h | ||
FName GetMotionControllerDeviceTypeName() |
Returns the device type of the controller. | IMotionController.h | |
virtual bool SetEnhancedInputUserSettings
(
TObjectPtr< class UEnhancedInputUserSettings > InputSettings |
Add a set of enhanced input user settings to the motion controller. | IMotionController.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FRotator AngularVelocityAsAxisAndLengthToRotator
(
const FVector AngularVelocityAsAxisAndLength |
IMotionController.h | ||
static bool GetHandEnumForSourceName
(
const FName Source, |
IMotionController.h | ||
static FName GetModularFeatureName() |
IMotionController.h |