API reference
API reference
Select your platform
No SDKs available
No versions available

LocomotionTurnerInteractor Class

Defines an IInteractor which performs locomotion turns (i.e., rotating the user in virtual space) based on input from a pair of Unity Transforms, which typically are independently positioned in the scene based on hand or body tracking.
There is no real interactable for this interactor (LocomotionTurnerInteractable is an empty type, as described in the comments on that class).
For the controller-driven counterpart to this type, see LocomotionAxisTurnerInteractor.

Fields

ITrackingToWorldTransformer for moving spatial data between world space and tracking space.
This is required so that turning calculations can be performed in tracking space.
Center point where the Axis value is 0.
This point is set at the start of interaction and moved based on user movement (for example, if the user moves Origin further than DragThresold from the MidPoint.
Point of the actual origin in world space.
The offset from Origin to MidPoint indicates the Axis value. This point is articulated independently of the interactor, but it typically represents user motion (for example, a hand's position in space).
Implementation of IInteractor.ShouldHover; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.ShouldUnhover; for details, please refer to the related documentation provided for that interface.

Properties

Offset from MidPoint at which the pointer will be dragged.
The MidPoint of the turner interactor implies a "reset distance" on turn direction choice, and dragging it making it easier to choose the other direction to turn. For example, if the user begins interacting by moving their hand fifteen centimeters to the left, that will select "left" as the turn direction. Then, if the user wishes to change direction an turn right, without dragging the user will have to move more than fifteen centimeters to the right. However, if DragThreshold was 0.05 (or any number smaller than 0.15), then the user would only have to move right by that amount to change direction because the MidPoint would have been dragged after left movement exceeded the threshold.
Event broadcast to indicate that the axis has changed sign (i.e., the user has switched from turning left to turning right, or vice versa).
For more information, see the remarks on Value.

Protected Functions

virtual override void Awake ( )
virtual override void Start ( )
virtual override void HandleEnabled ( )
virtual override void DoHoverUpdate ( )
virtual override void DoSelectUpdate ( )
virtual override LocomotionTurnerInteractable ComputeCandidate ( )

Member Functions

Axis value of the interactor, between -1 and 1 where a negative number indicates a `left turn and a positive value a right turn.
"Axis" in this context refers to an underlying conceptual IAxis1D analogous to the IAxis2D used by LocomotionAxisTurnerInteractor. While there is no actual underlying axis for LocomotionTurnerInteractors, axis-like values are calculated from the Unity transforms the interactor observes, and those values are used to make interaction decisions.
Returns
A value between -1 and 1
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets the origin transform (the point representing the user's direct input, typically a tracked hand) for a dynamically instantiated LocomotionTurnerInteractor.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets an ISelector for a dynamically instantiated LocomotionTurnerInteractor.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets the stabilization transform (the a point used in interaction calculations, typically a tracked or estimated shoulder or elbow position) for a dynamically instantiated LocomotionTurnerInteractor.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets an ITrackingToWorldTransformer for a dynamically instantiated LocomotionTurnerInteractor.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon