Swipe Sensor

From Fancade Wiki
Swipe Sensor
Swipe_Sensor.png
TypeScript block
ColliderNone
FolderControl
Ports
Inputs Before
Outputs Swiped
Direction
After

Executes the output when user performs a swipe gesture. Also, outputs the swipe direction.

Outputs:

  • Swiped: Executed only if the player swiped the screen.
  • Direction: A normalized cardinal direction in the XZ plane.

Notes

  • The Swipe Sensor is easy to use, but limited. The swipe direction is always a cardinal direction in the X/Z plane. If you need more, script your own swipe sensor using the Touch Sensor.
  • If the player holds the finger after swiping, it only outputs the signals every 15 ticks.