Modules overview

Modules overview

Core

The model of this module is accessible from any HPTKElement and contains both the models for every avatars in the scene and the references to the objects that should only be instantiated once in the scene (singletons). It includes references to configuration assets.

Avatar

This module contains and updates the information related to the body (e.g. position of the head, feet or shoulders) including the list of ProxyHands of the avatar (for humanoids, two).

ProxyHand

This module contains and updates the information related to each hand, both in its master and slave representation (or any other extra representation that may be required). Each one of these "representations" is an instance of the HandModel class, from which we can access not only the information and references of each finger and each bone but also the updated values of finger-level and hand-level gestures (e.g. pinch for each finger, flex lerp for each finger, fist lerp or grasp lerp). ProxyHandModel includes the list of HPTKHandlers of other modules associated with this ProxyHand (registered by themselves on Start).

Input

This module takes the values provided by an InputDataProvider and updates the transformations of each bone of the master representation of a ProxyHand. An InputDataProvider is responsible for providing the list of AbstractTransforms for each bone in the correct format regardless of the platform (input abstraction). At the moment, only 2 are available:

  • OVRSkeletonTracker: It takes the transforms from OVRSkeleton.Bones (HPTK-Sample).

  • RelativeSkeletonTracker: Mimics the transforms of another ProxyHand according to a reference point. Used in the mirrored character.

HandPhysics

This module updates the ConfigurableJoints of the slave representation of a ProxyHand and allows the slave to reach its master. You can change the physical configuration of the hand by changing the reference to the HandPhysicsConfiguration asset in HandPhysicsModel. If you leave it empty, HPTK will use the HandPhysicsConfiguration asset referenced in CoreModel. HandPhysicsConfiguration allows you to fine tune many parameters to make hands stronger, weaker or even make the hand to follow fingers but not wrist.

Interactor

This module contains and updates the list and state of interactions (hover, touch or grab) that the slave representation of a ProxyHand is having with other Interactable objects. InteractorHandler (instantiated as InteractorController) invokes useful UnityEvents that you can use (e.g. OnHover, OnFirstGrab or OnLastUntouch).

Interactable

This module contains the number of interactions that are happening on it as well as the list of other modules that are associated to the object instead of a ProxyHand. The interactable doesn’t know what interactors are interacting with it. Its model is updated thanks to the events invoked by the different Interactors that act on it. InteractableHandler (instantiated as InteractableController) also has useful UnityEvents that you can use (e.g. OnHover, OnFirstGrab, or OnLastUntouch).

Class diagram

Last updated