-
Notifications
You must be signed in to change notification settings - Fork 14
Input Manager
Input Manager is one of the most important classes in BDK. It is responsible for handling all events related to input and manupulation of objects in the scene. This page outlines the most important events, actions and functions in InputManager.
Below is a description of the different ones.
Is called when an input source is found.
Is called when an input source is lost.
Is called when a hand stops pinching.
Is called whenever a hand inside the tracking volume.
Is called whenever a hand starts pinching.
Is called when a hand pinches down.
Is called while a hand is pinching.
Is called when a hand stops pinching.
Is called when a hand is in proximity of an object.
Is called while a hand is in proximity of an object.
Is called when a hand leaves the proximity of an object.
Is called when a phrase is recognized.
Is called when the user looks at a new or different object than they looked at the previous frame.
Is called when the user is looking at something. i.e. the raycast from the eyes hit a collider.
Is called when the user stops looking at an object, blinks, closes their eyes, or tracking is lost in another way.
Is called each frame with the updated position, rotation and forward vector of the Hololens gameobject.
Is called each frame with the updated hand rotation.
TryGetFocusedObject tries to get a reference to the GameObject currently being focused on. This function will take into account the input priority of all the input sources and select the responding object. The object is returned as an out parameter. The function returns true if an object is being focused on, and false otherwise.
TryGetFocusedInteractable tries to get a reference to the GameObject currently being focused on but only if it has an Interactible component. This function will take into account the input priority of all the input sources and select the responding object. The object is returned as an out parameter. The function returns true if an object is being focused on, and false otherwise.
TryGetFocusedButton tries to get a reference to the GameObject currently being focused on but only if it has an InteractibleButton component. This function will take into account the input priority of all the input sources and select the responding object. The object is returned as an out parameter. The function returns true if an object is being focused on, and false otherwise.
Returns the main cursor position. (based on input priority)
Returns the main cursor rotation. (based on input priority)
Returns the transform of the main cursor. (based on input priority)
Returns the transform of any cursor you want as long as it exists.
TryGetMainActiveInputSource returns the main input source as an out parameter. The function returns true if an input source is found, and false otherwise.
TryGetInputSource tries to get a specific input source from the list of input sources. This is returned as an out parameter. The function returns true if an input source is found, and false otherwise.
AddPhraseForVoiceRecognizion tries to add a new phrase and action to the voice recognition functionality.
TryGetHandJointTransform tries to get a specific joint transform from a specified hand. The position and rotation are returned as out parameters. The function returns true if a joint is found, and false otherwise.
TryGetDistanceBetweenJoints tries to get the distance between a joint on the left and a joint on the right hand (the same joint type). The distance is returned as out parameters. The function returns true if a joint is found, and false otherwise.