Skip to main content

GameControllerModule.TouchState

Enum

State of a single touch point on the controller touchpad.

  • Snapchat: not supported
  • SPECS: fully supported
  • Camera Kit Web: not supported
  • Camera Kit Mobile: not supported
1 platform note
  • SnapchatNot supported — Available on SPECS only
  • SPECSFully supported
    • Experimental API; it may change or be removed.
  • Camera Kit WebNot supported — Available on SPECS only
  • Camera Kit MobileNot supported — Available on SPECS only

Platform details

  • Snapchat — Not supported — Available on SPECS only.

  • SPECS — Fully supported. Experimental API; it may change or be removed

  • Camera Kit Web — Not supported — Available on SPECS only.

  • Camera Kit Mobile — Not supported — Available on SPECS only.

Since Lens Scripting v373Experimental

State of a single touch point on the controller touchpad.

Index

Enumeration Members

Example

//@input Asset.GameControllerModule gameControllerModule
var provider = script.gameControllerModule.createController();
provider.onTouchpadEvent.add(function(event) {
event.touches.forEach(function(touch) {
if (touch.state === GameControllerModule.TouchState.Began) {
print("Touch " + touch.id + " began");
}
});
});

Enumeration Members

Began

Began: number

ExperimentalSPECS

A new touch has started.

Since

Lens Scripting Version 373


Cancelled

Cancelled: number

ExperimentalSPECS

A touch was cancelled (e.g. interrupted by system).

Since

Lens Scripting Version 373


Ended

Ended: number

ExperimentalSPECS

A touch has ended (finger lifted).

Since

Lens Scripting Version 373


Moved

Moved: number

ExperimentalSPECS

An ongoing touch has changed position.

Since

Lens Scripting Version 373