Skip to main content

MotionController.TouchPhase

Enum

Enum that defines a current state of a touch interaction with the touchpad of the motion controller.

  • Snapchat: not supported
  • SPECS: fully supported
  • Camera Kit Web: not supported
  • Camera Kit Mobile: not supported
  • SnapchatNot supported — SPECS only
  • SPECSFully supported
  • Camera Kit WebNot supported — SPECS only
  • Camera Kit MobileNot supported — SPECS only

Platform details

  • Snapchat — Not supported — SPECS only.

  • SPECS — Fully supported.

  • Camera Kit Web — Not supported — SPECS only.

  • Camera Kit Mobile — Not supported — SPECS only.

Enum that defines a current state of a touch interaction with the touchpad of the motion controller.

Index

Enumeration Members

Example

controller.onTouchEvent.add(eventData => {
switch (eventData.phase) {
case MotionController.TouchPhase.Began:
print("Began touch")
break;
case MotionController.TouchPhase.Canceled:
print("Canceled touch")
break;
case MotionController.TouchPhase.Moved:
print("Touch moved")
break;
case MotionController.TouchPhase.Ended:
print("Touch Ended")
break;
}
})

Enumeration Members

Began

Began: number

SPECS only

Indicates that a touch event has started. This is triggered when the user initially touches the interactive area.


Canceled

Canceled: number

SPECS only

Indicates that the touch event was interrupted or canceled, typically due to an error or the touch being outside the interactive area.


Ended

Ended: number

SPECS only

Indicates that the touch event has ended. This occurs when the user lifts their finger off the interactive area, completing the touch interaction.


Moved

Moved: number

SPECS only

Indicates that the touch event has moved. This is triggered when the user drags or slides their finger across the interactive area.