IMotionController::GetControllerOrientationAndPositionForTime

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.

Windows
MacOS
Linux

Override Hierarchy

IMotionController::GetControllerOrientationAndPositionForTime()

FXRMotionControllerBase::GetControllerOrientationAndPositionForTime()

References

Module

HeadMountedDisplay

Header

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

Include

#include "IMotionController.h"

Syntax

bool GetControllerOrientationAndPositionForTime
(
    const int32 ControllerIndex,
    const FName MotionSource,
    FTimespan Time,
    bool & OutTimeWasUsed,
    FRotator & OutOrientation,
    FVector & OutPosition,
    bool & OutbProvidedLinearVelocity,
    FVector & OutLinearVelocity,
    bool & OutbProvidedAngularVelocity,
    FVector & OutAngularVelocityRadPerSec,
    float WorldToMetersScale
) const

Remarks

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.

Returns

True if the device requested is valid and tracked, false otherwise

Parameters

Parameter

Description

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.

OutAngularVelocityRadPerSec

(out) The angular velocity of the controller in Radians per Second.

WorldToMetersScale

The world scaling factor.

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