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

SnapInteractable Class

Provide Pose targets for SnapInteractors to translate and rotate towards.
In a Snap interaction, the Interactable can be thought of as the target, with the interactor as the source. The SnapInteractor finds interactables in much the same way as other interactions, and uses this association to determine which target to snap to.

Fields

The rigidbody of the snap target.

Properties

ISnapPoseDelegate SnapPoseDelegate[Get]
IMovementProvider MovementProvider[Get]

Protected Functions

virtual override void Awake ( )
virtual override void Start ( )
override void InteractorAdded
( SnapInteractor interactor )
override void InteractorRemoved
( SnapInteractor interactor )
override void SelectingInteractorAdded
( SnapInteractor interactor )
override void SelectingInteractorRemoved
( SnapInteractor interactor )

Member Functions

Moves the tracked element using the ISnapPoseDelegate.
Sets the pose for the interactor.
Parameters
interactor
The SnapInteractor object.
result
The resulting pose.
Generates a movement that when applied will move the interactor from a start to a target pose.
Parameters
from
The starting position of the interactor.
interactor
The interactor to move.
Injects all required dependencies for a dynamically instantiated SnapInteractable.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets the underlying Rigidbody for a dynamically instantiated SnapInteractable.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets the underlying optional IMovementProvider for a dynamically instantiated SnapInteractable.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets the underlying optional ISnapPoseDelegate for a dynamically instantiated SnapInteractable.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon