-
Notifications
You must be signed in to change notification settings - Fork 14
Interaction
There are two main kinds of hand interaction in BDK; physical interaction and interaction beams. Physical interaction occurs when your hand gets close enough to an object that can be interacted with. When you do, objects listening to the OnProximityStarted
, OnProximityUpdated
and OnProximityEnded
events in InputManager
will react. If you pinch down you index and thumb objects listening to the events OnManipulationStarted
, OnManipulationUpdated
and OnManipulationEnded
will react. Interaction beam interaction occurs when you target an object that can be interacted with with the interaction beam and pinch down. When that occurs, objects listening to the events OnManipulationStarted
, OnManipulationUpdated
and OnManipulationEnded
will react. Whenever you pinch/release your thumb and index finger the events OnInputDown
, OnInputUpdated
and OnInputUp
will fire in response. Any objects/scripts listening to those events will be able to respond as you choose. Most of the BDK examples/prefabs is interacted with by your hands/interaction beams using these events in one way or another. Here are a few examples:
All example buttons in BDK can be interacted with by physically pressing them down with your index finger. They can also be clicked by targeting them with the interaction beams and pinching-and-releasing (although this feature can be altered in the inspector to fit your needs/preferences).
The sliders in BDK can be interacted with either by physically pinching down on them when close enough to "touch" them, or by targeting them with the interaction beam and pinching down.
The example grabbables and panels in BDK can be moved around by either physically griping them or by targeting them with the interaction beams and pinching down. The examples of grabbables/panels can also be scaled and rotated when interacted with by both hands.
Head gaze interaction is interactions that are based on the orientation of the HoloLens itself. This is what the original HoloLens used to allow you to target buttons and holograms. If head gaze is activated you can interact with objects by listening to the OnHololensTransformUpdated
event in InputManager
.
Eye gaze interaction is interactions that are based on the where you are looking. This uses the internal eye tracking system built into the HoloLens. If eye gaze is activated you can interact with objects listening to the OnGazeEnter
, OnGazeUpdate
and OnGazeExit
events in InputManager
.