Skip to content

Scaling Direct Interactor

eisclimber edited this page Nov 3, 2024 · 3 revisions

Scaling Direct Interactor

class in ExPresSXR.Rig / Extends ExPresSXR.Rig.XRDirectInteractor
Component added via Component Menu

Description

Allows direct interactions with XRInteractables whilst also allowing them to be scaled, if they were configured as a Scalable Grab Interactable.

Members

Public Properties

  • bool scalingEnabled: Whether or not scaling is enabled/possible.
  • bool scaleSpeed: How fast the scale is in-/decreased. Will be synchronized with deltaTime.
  • bool hasScalingSelection: (Readonly) Whether or not a Scalable Grab Interactable is currently selected.

Public Methods

  • void ProcessInteractor(): Used internally. Processes interactables like a DirectInteractor but also performs scaling on valid Interactables.
  • TryGetSelectedScaleInteractableWrapper(out ScalableGrabInteractable _scaleInteractable): Tries to get the selected ScalableGrabInteractable by this Interactor.

Protected Methods

  • bool TryRead2DAxis(InputAction action, out Vector2 output): Copied from the XRRayInteractor because it is not accessible in this scope. Reads the value from the given InputAction as Vector2.
  • void ScaleSelection(float directionAmount): Scales the Selection by the directionAmount (+/-1.0f) if it is a ScalableGrabInteractable.

ExPresS XR Wiki

Tutorial Pages

Code Documentation

Clone this wiki locally