Class TwoHandedGrabMoveProvider
Allows the user to combine two Grab
Inheritance
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit.Locomotion.Movement
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@3.1/api/UnityEngine.XR.Interaction.Toolkit.Locomotion.Movement.TwoHandedGrabMoveProvider.html")]
[MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
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 |
---|---|
Grab |
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 |
---|---|
Grab |
See Also
rotateTransformation
The transformation that is used by this component to apply rotation movement.
Declaration
public XRBodyYawRotation rotateTransformation { get; set; }
Property Value
Type | Description |
---|---|
XRBody |
See Also
scaleTransformation
The transformation that is used by this component to apply scaling.
Declaration
public XRBodyScale scaleTransformation { get; set; }
Property Value
Type | Description |
---|---|
XRBody |
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
MoveRig(Vector3)
Creates a locomotion event to move the rig by translationInWorldSpace
,
and optionally restricts movement along each axis and applies gravity.
Declaration
protected override void MoveRig(Vector3 translationInWorldSpace)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | translationInWorldSpace | The translation amount in world space to move the rig (before restricting movement along each axis and applying gravity). |
Overrides
See Also
OnDisable()
See Mono
Declaration
protected void OnDisable()
See Also
OnEnable()
See Mono
Declaration
protected void OnEnable()