API reference

SnapInteractor Class

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

Properties

DistanceThreshold : float
[Get][Set]
Signature
float DistanceThreshold
PointableElement : IPointableElement
[Get]
Signature
IPointableElement PointableElement
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
SnapPose : Pose
[Get]
Signature
Pose SnapPose

Protected Methods

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

Methods

InjectAllSnapInteractor ( pointableElement , rigidbody )
Sets all required values for a <cref="SnapInteractor" /> on a dynamically instantiated GameObject.
Signature
void InjectAllSnapInteractor(PointableElement pointableElement, Rigidbody rigidbody)
Parameters
pointableElement: PointableElement
rigidbody: Rigidbody
Returns
void
InjectOptionalSnapPoseTransform ( snapPoint )
Sets a snap point on a dynamically instantiated GameObject.
Signature
void InjectOptionalSnapPoseTransform(Transform snapPoint)
Parameters
snapPoint: Transform
Returns
void
InjectOptionalTimeOutInteractable ( interactable )
Sets a time out interactable on a dynamically instantiated GameObject.
Signature
void InjectOptionalTimeOutInteractable(SnapInteractable interactable)
Parameters
interactable: SnapInteractable
Returns
void
InjectOptionaTimeOut ( timeOut )
Sets a timeout on a dynamically instantiated GameObject.
Signature
void InjectOptionaTimeOut(float timeOut)
Parameters
timeOut: float
Returns
void
InjectPointableElement ( pointableElement )
Sets a <cref="PointableElement" /> on a dynamically instantiated GameObject.
Signature
void InjectPointableElement(PointableElement pointableElement)
Parameters
pointableElement: PointableElement
Returns
void
InjectRigidbody ( rigidbody )
Sets a Rigidbody on a dynamically instantiated GameObject.
Signature
void InjectRigidbody(Rigidbody rigidbody)
Parameters
rigidbody: Rigidbody
Returns
void