API reference
API reference
Select your platform
No SDKs available
No versions available

SnapInteractor Class

SnapInteractors can snap to poses provided by SnapInteractables.
SnapInteractors select and unselect in response to a IPointableElement. SnapInteractors hover when the IPointableElement has selecting pointers and snap to the best SnapInteractable pose when the IPointableElement has no more selecting pointers.

Fields

This IPointableElement will trigger the snap interaction.
This interactor will listen to select and unselect events from this element, and begin the snap interaction in response to these events.
The Rigidbody of the interactor object.
This is the source pose that will be snapped to the SnapInteractable target.
By default this will be the Pose of this GameObject's transform, but can be another transform's pose if a _snapPoseTransform is provided. An example usage of this is a vase which should be snapped to a table using a point on its base, rather than the center of the vase object.

Properties

Used to determine which object should snap to your hand when there are multiple to choose from.
Objects with a lower threshold have a higher priority.

Protected Functions

virtual override void Awake ( )
virtual override void Start ( )
virtual override void OnEnable ( )
virtual override void OnDisable ( )
virtual override bool ComputeShouldSelect ( )
virtual override bool ComputeShouldUnselect ( )
virtual override void DoHoverUpdate ( )
virtual override void DoSelectUpdate ( )
override void InteractableSet
( SnapInteractable interactable )
override void InteractableUnset
( SnapInteractable interactable )
override void InteractableSelected
( SnapInteractable interactable )
override void InteractableUnselected
( SnapInteractable interactable )
virtual void HandlePointerEventRaised
( PointerEvent evt )
virtual override void DoPreprocess ( )
Pose ComputePointerPose ( )
virtual override SnapInteractable ComputeCandidate ( )

Member Functions

Sets all required values for a <cref="SnapInteractor" /> on a dynamically instantiated GameObject.
Sets a <cref="PointableElement" /> on a dynamically instantiated GameObject.
Sets a Rigidbody on a dynamically instantiated GameObject.
Sets a snap point on a dynamically instantiated GameObject.
Sets a time out interactable on a dynamically instantiated GameObject.
Sets a timeout on a dynamically instantiated GameObject.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon