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

MicrogestureBits Object

Defines bit flags for microgesture input states.
MicrogestureBits provides constants for individual hand microgestures, as well as predefined masks for common microgesture combinations. Each microgesture is represented by a specific bit position, allowing multiple microgesture states to be combined using bitwise operations.
These constants are used for detecting specific microgesture combinations for custom interactions
Example usage:
val microgestures = entity.getComponent<Microgestures>()
val changedMicrogestures = microgestures.changedMicrogestures
val microgestureState = microgestures.microgestureState
val microgesturesPressed = microgestureState and changedMicrogestures
val microgesturesReleased = microgestureState.inv() and changedMicrogestures
if (microgesturesPressed and MicrogestureBits.LeftMicrogestureSwipeLeft != 0) {
  // Left hand swipe left microgesture detected
}

Signature

object MicrogestureBits

Properties

AllMicrogesturesMask : Int
[Get]
Comprehensive mask for all microgestures from both hands. Combines left and right microgesture masks.
Signature
val AllMicrogesturesMask: Int
LeftMicrogestures : Int
[Get]
Mask for all left hand microgestures. Includes swipe left, swipe right, swipe forward, swipe back, and tap thumb.
Signature
val LeftMicrogestures: Int
LeftMicrogestureSwipeBack : Int
[Get]
Left hand swipe back microgesture
Signature
val LeftMicrogestureSwipeBack: Int
LeftMicrogestureSwipeForward : Int
[Get]
Left hand swipe forward microgesture
Signature
val LeftMicrogestureSwipeForward: Int
LeftMicrogestureSwipeLeft : Int
[Get]
Left hand swipe left microgesture
Signature
val LeftMicrogestureSwipeLeft: Int
LeftMicrogestureSwipeRight : Int
[Get]
Left hand swipe right microgesture
Signature
val LeftMicrogestureSwipeRight: Int
LeftMicrogestureTapThumb : Int
[Get]
Left hand tap thumb microgesture
Signature
val LeftMicrogestureTapThumb: Int
RightMicrogestures : Int
[Get]
Mask for all right hand microgestures. Includes swipe left, swipe right, swipe forward, swipe back, and tap thumb.
Signature
val RightMicrogestures: Int
RightMicrogestureSwipeBack : Int
[Get]
Right hand swipe back microgesture
Signature
val RightMicrogestureSwipeBack: Int
RightMicrogestureSwipeForward : Int
[Get]
Right hand swipe forward microgesture
Signature
val RightMicrogestureSwipeForward: Int
RightMicrogestureSwipeLeft : Int
[Get]
Right hand swipe left microgesture
Signature
val RightMicrogestureSwipeLeft: Int
RightMicrogestureSwipeRight : Int
[Get]
Right hand swipe right microgesture
Signature
val RightMicrogestureSwipeRight: Int
RightMicrogestureTapThumb : Int
[Get]
Right hand tap thumb microgesture
Signature
val RightMicrogestureTapThumb: Int
Did you find this page helpful?