-
-
Notifications
You must be signed in to change notification settings - Fork 2
Scaling Ray Interactor
eisclimber edited this page Nov 3, 2024
·
3 revisions
class in ExPresSXR.Rig / Extends ExPresSXR.Rig.XRRayInteractor
Component added via Component Menu
Allows ray interactions with XRInteractables whilst also allowing them to be scaled, if they were configured as a Scalable Grab Interactable.
Uses the RayInteractors anchorControl
-Mode to de-/activate scaling or translation. The differentiation for anchorControl and scaling is handled via the anchorControlMode.
-
AnchorControlMode anchorControlMode
: Determines how the anchorControl/scaling InputActions (Joystick up/down) are handled. Default: ScaleWithTranslateFallback -
bool scaleSpeed
: How fast the scale is in-/decreased. Will be synchronized with deltaTime.
-
bool CanSetHighlighterScaleWithCollider()
: Can be checked if the SocketInteractor has aSphereCollider
- orBoxCollider
-Component, thususeColliderSizeAsScale
can be set to true. -
void SetHighlighterVisible(bool visible)
: Used to show or hide thehighlighterObject
. Can be overwritten to modify the behavior of when the highlighter is allowed to be shown.
-
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 TranslateAnchor(Transform rayOrigin, Transform anchor, float directionAmount)
: Translates or scales the selection by the directionAmount (+/-1.0f) if it is a ScalableGrabInteractable.
-
AnchorControlMode
: How anchorControl is handled on Interactables. The optionScaleWithTranslateFallback
will scale interactables if they are a Scalable Grab Interactables or translate the interactable if not.
Autor: Luca 'eisclimber' Dreiling; License: MIT
- Getting Started
- Development and Contribution
- Misc
- Experimentation
- Data Gatherering
- Eye Tracking
- ExPresS XR Rig
- Interaction
- Base Button
- Button Quiz
- Collision Hand Rumbler
- Collision Sound Emitter
- Exit Game Interactable (Script Deprecated)
- Interactables
- Haptic Impulse Trigger
- Socket Interactors
- Inverse Kinematics
- Localization
- Minigames
- Coin Scale
- Coin Throw
- Sword Cleaning
- Misc
- Movement
- Presentation
- UI