API reference

SnapInteractable Class

Implements IRigidbodyRef
SnapInteractables provide Pose targets for SnapInteractors to translate and rotate towards.

Properties

Rigidbody : Rigidbody
[Get]
The Unity Rigidbody most relevant to the current instance.
The role this Rigidbody plays varies according to the implementing type; for example, an HandGrab.HandGrabInteractor may use a Rigidbody for collision detection when grabbing.
Signature
Rigidbody Rigidbody

Protected Methods

Awake ()
Signature
override void Awake()
Returns
override void
InteractorAdded ( interactor )
Signature
override void InteractorAdded(SnapInteractor interactor)
Parameters
interactor: SnapInteractor
Returns
override void
InteractorRemoved ( interactor )
Signature
override void InteractorRemoved(SnapInteractor interactor)
Parameters
interactor: SnapInteractor
Returns
override void
SelectingInteractorAdded ( interactor )
Signature
override void SelectingInteractorAdded(SnapInteractor interactor)
Parameters
interactor: SnapInteractor
Returns
override void
SelectingInteractorRemoved ( interactor )
Signature
override void SelectingInteractorRemoved(SnapInteractor interactor)
Parameters
interactor: SnapInteractor
Returns
override void
Start ()
Signature
override void Start()
Returns
override void

Methods

GenerateMovement ( from , interactor )
Generates a movement that when applied will move the interactor from a start to a target pose.
Signature
IMovement GenerateMovement(in Pose from, SnapInteractor interactor)
Parameters
from: in Pose  The starting position of the interactor.
interactor: SnapInteractor  The interactor to move.
Returns
IMovement
InjectAllSnapInteractable ( rigidbody )
Sets all required values for a snap interactable to a dynamically instantiated GameObject.
Signature
void InjectAllSnapInteractable(Rigidbody rigidbody)
Parameters
rigidbody: Rigidbody
Returns
void
InjectOptionalMovementProvider ( provider )
Sets a movement provider on a dynamically instantiated GameObject.
Signature
void InjectOptionalMovementProvider(IMovementProvider provider)
Parameters
Returns
void
InjectOptionalSnapPoseDelegate ( snapPoseDelegate )
Sets a snap pose delegate on a dynamically instantiated GameObject.
Signature
void InjectOptionalSnapPoseDelegate(ISnapPoseDelegate snapPoseDelegate)
Parameters
snapPoseDelegate: ISnapPoseDelegate
Returns
void
InjectRigidbody ( rigidbody )
Sets a Rigidbody on a dynamically instantiated GameObject.
Signature
void InjectRigidbody(Rigidbody rigidbody)
Parameters
rigidbody: Rigidbody
Returns
void
InteractorHoverUpdated ( interactor )
Moves the tracked element using the <cref="ISnapPoseDelegate" />.
Signature
void InteractorHoverUpdated(SnapInteractor interactor)
Parameters
interactor: SnapInteractor
Returns
void
PoseForInteractor ( interactor , result )
Sets the pose for the interactor.
Signature
bool PoseForInteractor(SnapInteractor interactor, out Pose result)
Parameters
interactor: SnapInteractor  The SnapInteractor object.
result: out Pose  The resulting pose.
Returns
bool