expressxrgrabinteractable - eisclimber/ExPresS-XR GitHub Wiki
Class in ExPresSXR.Interaction
Inherits from UnityEngine.XR.Interaction.Toolkit.Interactables.XRGrabInteractable
Acts as a wrapper for allowing XRGrabInteractables to be scaled while being held. This will not scale the GameObject itself but all of it's children. Scaling will be applied to the children using their initial scale.
public class ExPresSXRGrabInteractable : UnityEngine.XR.Interaction.Toolkit.Interactables.XRGrabInteractable| Name | Description |
|---|---|
| OnGrabAllowed | Emitted when a grab is allowed. |
| OnGrabDenied | Emitted when a grab is denied. |
| OnGrabReleased | Emitted when a grab is ended. |
| OnGrabStarted | Emitted when a grab is started. |
| OnScaleReset | Emitted when the scale of this interactable is reset. |
| Name | Description |
|---|---|
| GetAttachTransform(IXRInteractor) | Return the attach transform for the interactor. |
If the interactor is a SocketInteractor and a _customSocketAttach is set, it is returned. |
|
| HideFromPlayerForDuration(float) | Disables all visuals during which grabbing is prevented. |
| IsSelectableBy(IXRSelectInteractor) | Denies selection of direct and ray interactors if grabbing is not allowed, emitting the respective events. |
| ResetScale() | Resets the scale of all (scaled) children to 1.0f |
| Name | Description |
|---|---|
| AllowGrab | If false, denies interactions with ray and direct interactors. Can be used to enable interaction after a certain stage or disable it later. |
| CustomSocketAttach | Custom attach used for socket interactors. |
| HasScaleSpeedOverride | If the interactable has a speed scale override. |
| InitialScales | The initial scales of the object in _scaledChildren. Only available at runtime. |
| MaxScaleFactor | Maximal scale possible, negative values are considered unbound. |
| MinScaleFactor | Minimal scale possible, negative values are considered unbound. |
| Scalable | If scaling is possible, that if the ScaleRange is greater than zero. |
| ScaleAllChildren | If all children should be scaled or only those set as scaledChildren via the editor. |
| ScaledChildren | Children affected by scaling. Setting this value during runtime will use the current scales as initial scale. |
| ScaleFactor | The current scale to the children, relative to their initial scale. |
| ScaleRange | Range of scaling. If either the min or max scale is set. Else infinity will be returned. |
| ScaleSpeedOverride | Override to the scale speed of the ScalingRayInteractor or ScalingDirectInteractor. |
| It is recommended to change the scale speed in the interactors themselves and use this override sparingly! | |
| TreatNearFarAsGrab | If enabled allows NearFarInteractors to be treats as valid Direct Interactor. |
| It is recommended to set the max interaction distance to the size of near interaction volume, | |
| as we can not differentiate hovers from it and the ray. |