Class TwoHandedGrabMoveProvider
Allows the user to combine two GrabMoveProvider instances for locomotion. This allows the user to translate, scale, and rotate themselves counter to transformations of the line segment between both hands.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[DefaultExecutionOrder(-209)]
[AddComponentMenu("XR/Locomotion/Two-Handed Grab Move Provider", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.5/api/UnityEngine.XR.Interaction.Toolkit.TwoHandedGrabMoveProvider.html")]
public class TwoHandedGrabMoveProvider : ConstrainedMoveProvider
Properties
enableRotation
Controls whether to enable yaw rotation of the user.
Declaration
public bool enableRotation { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
enableScaling
Controls whether to enable uniform scaling of the user.
Declaration
public bool enableScaling { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
leftGrabMoveProvider
The left hand grab move instance which will be used as one half of two-handed locomotion.
Declaration
public GrabMoveProvider leftGrabMoveProvider { get; set; }
Property Value
Type | Description |
---|---|
GrabMoveProvider |
See Also
maximumScale
The maximum user scale allowed.
Declaration
public float maximumScale { get; set; }
Property Value
Type | Description |
---|---|
float |
See Also
minimumScale
The minimum user scale allowed.
Declaration
public float minimumScale { get; set; }
Property Value
Type | Description |
---|---|
float |
See Also
moveFactor
The ratio of actual movement distance to controller movement distance.
Declaration
public float moveFactor { get; set; }
Property Value
Type | Description |
---|---|
float |
See Also
overrideSharedSettingsOnInit
Controls whether to override the settings for individual handed providers with this provider's settings on initialization.
Declaration
public bool overrideSharedSettingsOnInit { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
requireTwoHandsForTranslation
Controls whether translation requires both grab move inputs to be active.
Declaration
public bool requireTwoHandsForTranslation { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
rightGrabMoveProvider
The right hand grab move instance which will be used as one half of two-handed locomotion.
Declaration
public GrabMoveProvider rightGrabMoveProvider { get; set; }
Property Value
Type | Description |
---|---|
GrabMoveProvider |
See Also
Methods
ComputeDesiredMove(out bool)
Determines how much to move the rig.
Declaration
protected override Vector3 ComputeDesiredMove(out bool attemptingMove)
Parameters
Type | Name | Description |
---|---|---|
bool | attemptingMove | Whether the provider is attempting to move. |
Returns
Type | Description |
---|---|
Vector3 | Returns the translation amount in world space to move the rig. |
Overrides
See Also
OnDisable()
See MonoBehaviour.
Declaration
protected void OnDisable()
See Also
OnEnable()
See MonoBehaviour.
Declaration
protected void OnEnable()