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

MatchNonDominantPalmWorldSpaceTransform Class

Extends MonoBehaviour
Matches the position and rotation of the user's dominant hand in world space.
Normally this sort of behavior is done using the transform hierarchy, but in this case doing it via a script is cleaner as it (1) allows us to avoid nesting elements under the hand prefab itself and (2) allows the behavior to easily swap between hands depending on which hand is dominant. This also provides a convenient location for the rotation math that keeps the menu aligned "y-up" while still facing the "aim point" and located at the "anchor point." The default anchor- and aim-point values roughly center the menu just above the palms, facing away from the hands.

Properties

IHand LeftHand[Get]
IHand RightHand[Get]

Protected Functions

virtual void Awake ( )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon