![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <IMotionController.h>
Inheritance diagram for IMotionController:Static Public Member Functions | |
| static FName | GetModularFeatureName () |
| static FRotator | AngularVelocityAsAxisAndLengthToRotator (const FVector AngularVelocityAsAxisAndLength) |
| static HEADMOUNTEDDISPLAY_API bool | GetHandEnumForSourceName (const FName Source, EControllerHand &OutHand) |
Static Public Attributes | |
| static FName | FeatureName = FName(TEXT("MotionController")) |
| static HEADMOUNTEDDISPLAY_API FName | LeftHandSourceId |
| static HEADMOUNTEDDISPLAY_API FName | RightHandSourceId |
| static HEADMOUNTEDDISPLAY_API FName | HMDSourceId |
| static HEADMOUNTEDDISPLAY_API FName | HeadSourceId |
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.
|
inlinevirtual |
|
inlinestatic |
|
inlinevirtual |
Add input mapping contexts to the motion controller. This allows the motion controller to support Enhanced Input actions.
| MappingContexts | The set of input mapping contexts used with motion controllers |
|
pure virtual |
Called to request the motion sources that this IMotionController provides
| Sources | A motion source enumerator object that IMotionControllers can add source names to |
|
pure virtual |
Returns the calibration-space orientation of the requested controller's hand.
| ControllerIndex | The Unreal controller (player) index of the controller set |
| MotionSource | Which source, within the motion controller to get the orientation and position for |
| OutOrientation | (out) If tracked, the orientation (in calibrated-space) of the controller in the specified hand |
| OutPosition | (out) If tracked, the position (in calibrated-space) of the controller in the specified hand |
| OutbProvidedLinearVelocity | (out) True if linear velocity was provided. |
| OutLinearVelocity | (out) The Linear velocity of the controller. |
| OutbProvidedAngularVelocity | (out) True if angular velocity was provided. |
| OutAngularVelocityAsAxisAndLength | (out) The angular velocity of the controller represented as an axis of rotation who's magnitude is the velocity in radians per second. See UHeadMountedDisplayFunctionLibrary::GetControllerTransformForTime2 for an example of how this can be turned into an FRotator without losing rotation speed beyond 180 degrees/second. |
| OutbProvidedLinearAcceleration | (out) True if linear acceleration was provided. |
| OutLinearAcceleration | (out) The Linear acceleration of the controller. |
| WorldToMetersScale | The world scaling factor. |
|
pure virtual |
Returns the calibration-space orientation of the requested controller's hand.
| ControllerIndex | The Unreal controller (player) index of the controller set |
| MotionSource | Which source, within the motion controller to get the orientation and position for |
| OutOrientation | (out) If tracked, the orientation (in calibrated-space) of the controller in the specified hand |
| OutPosition | (out) If tracked, the position (in calibrated-space) of the controller in the specified hand |
| WorldToMetersScale | The world scaling factor. |
|
pure virtual |
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. This is only intended to work with times very near the current frame. In general it should be called immediatly after receiving the button press. On many platforms this functionality is not supported and this function will set OutTimeWasUsed to false and then call GetControllerOrientationAndPosition, ignoring Time.
| ControllerIndex | The Unreal controller (player) index of the controller set |
| MotionSource | Which source, within the motion controller to get the orientation and position for |
| Time | The time at which we would like to query the orientation. |
| OutTimeWasUsed | (out) If true the time was used somehow to give a more temporally relevant orientation. If false the time was ignored and a cached value returned. |
| OutOrientation | (out) If tracked, the orientation (in calibrated-space) of the controller in the specified hand |
| OutPosition | (out) If tracked, the position (in calibrated-space) of the controller in the specified hand |
| OutbProvidedLinearVelocity | (out) True if linear velocity was provided. |
| OutLinearVelocity | (out) The Linear velocity of the controller. |
| OutbProvidedAngularVelocity | (out) True if angular velocity was provided. |
| OutAngularVelocityAsAxisAndLength | (out) The angular velocity of the controller represented as an axis of rotation who's magnitude is the velocity in radians per second. See UHeadMountedDisplayFunctionLibrary::GetControllerTransformForTime2 for an example of how this can be turned into an FRotator without losing rotation speed beyond 180 degrees/second. |
| OutbProvidedLinearAcceleration | (out) True if linear acceleration was provided. |
| OutLinearAcceleration | (out) The Linear acceleration of the controller. |
| WorldToMetersScale | The world scaling factor. |
|
pure virtual |
Returns the tracking status (e.g. not tracked, intertial-only, fully tracked) of the specified controller
|
pure virtual |
Returns a custom names parameter value
| MotionSource | The name of the motion source we want parameters for |
| ParameterName | The specific value we are looking for |
| bOutValueFound | (out) Whether the parameter could be found |
|
static |
|
pure virtual |
Returns the device type of the controller.
|
inlinevirtual |
Add a set of enhanced input user settings to the motion controller. This allows the motion controller to support Enhanced Input actions.
| InputConfig | The path to the enhanced user input settings asset |
|
static |
|
static |
|
static |
|
static |