API reference

HandPinchOffset Class

Extends MonoBehaviour
Standalone MonoBehaviour representation of a pinch offset for a specific IHand.
Though not deprecated, this is considered a legacy type and should not be used in new code without careful consideration.

Protected Fields

_started : bool
Signature
bool _started

Properties

Hand : IHand
[Get]
The IHand to which this joint belongs.
This property is populated during MonoBehaviour start-up with the value of the _hand field, which is set through the Unity Editor.
Signature
IHand Hand
LocalPositionOffset : Vector3
[Get][Set]
Gets and sets the position offset associated with this HandPinchOffset.
This is a low-level value which can be set to fundamentally change the behavior of the pinch offset, but this is something only experts should consider trying.
Signature
Vector3 LocalPositionOffset
MirrorOffsetsForLeftHand : bool
[Get][Set]
When the attached IHand's handedness is set to Left, this property will mirror the offsets.
This allows for offset values to be set in Right hand coordinates for both Left and Right hands.
Signature
bool MirrorOffsetsForLeftHand
RotationOffset : Quaternion
[Get][Set]
Gets and sets the rotation offset associated with this HandPinchOffset.
This is a low-level value which can be set to fundamentally change the behavior of the pinch offset, but this is something only experts should consider trying.
Signature
Quaternion RotationOffset

Protected Methods

Awake ()
Signature
virtual void Awake()
Returns
void
OnDisable ()
Signature
virtual void OnDisable()
Returns
void
OnEnable ()
Signature
virtual void OnEnable()
Returns
void
Start ()
Signature
virtual void Start()
Returns
void

Methods

InjectAllHandPinchOffset ( hand , handGrabApi )
Convenience method for adding all required dependencies to a dynamically-instantiated HandPinchOffset, combining InjectHand(IHand) and InjectHandGrabAPI(HandGrabAPI).
Signature
void InjectAllHandPinchOffset(IHand hand, HandGrabAPI handGrabApi)
Parameters
hand: IHand
handGrabApi: HandGrabAPI
Returns
void
InjectHand ( hand )
Adds a IHand to a dynamically instantiated HandPinchOffset.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void InjectHand(IHand hand)
Parameters
hand: IHand
Returns
void
InjectHandGrabAPI ( handGrabApi )
Adds a HandGrabAPI to a dynamically instantiated HandPinchOffset.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void InjectHandGrabAPI(HandGrabAPI handGrabApi)
Parameters
handGrabApi: HandGrabAPI
Returns
void
InjectOptionalCollider ( collider )
Adds a Unity Collider to a dynamically instantiated HandPinchOffset.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void InjectOptionalCollider(Collider collider)
Parameters
collider: Collider
Returns
void