Class XRDualGrabFreeTransformer
Grab transformer which supports moving and rotating unconstrained with multiple Interactors. Maintains the offset from the attachment points used for each Interactor and points in the direction made by each grab.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.Transformers
Assembly: solution.dll
Syntax
[AddComponentMenu("XR/Transformers/XR Dual Grab Free Transformer", 11)]
[HelpURL("https://docs.unity.cn/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Transformers.XRDualGrabFreeTransformer.html")]
public class XRDualGrabFreeTransformer : XRBaseGrabTransformer, IXRGrabTransformer
Remarks
When there is a single Interactor, this has identical behavior to XRSingleGrabFreeTransformer.
Properties
| Name | Description |
|---|---|
| multiSelectPosition | Controls how multiple interactors combine to drive this interactable's position |
| multiSelectRotation | Controls how multiple interactors combine to drive this interactable's rotation |
| registrationMode | Controls how this grab transformer will be registered automatically at startup. |
Methods
| Name | Description |
|---|---|
| OnDrawGizmosSelected() | See MonoBehaviour. |
| OnGrabCountChanged(XRGrabInteractable, Pose, Vector3) | Called by Unity each time the number of selections changes for the given Interactable while grabbed by at least one Interactor, including when it is first grabbed. Use this to do any code initialization based on each Interactor currently selecting the Interactable, for example computing the initial distance between both Interactors grabbing the object. |
| Process(XRGrabInteractable, UpdatePhase, ref Pose, ref Vector3) | Called by the linked Interactable to calculate the target pose and scale.
Modify the value of |