Swipe Sensor: Difference between revisions

From Fancade Wiki
m (Use infobox, and add documentation for outputs)
mNo edit summary
 
Line 19: Line 19:


* 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]].
* 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 frames.
* If the player holds the finger after swiping, it only outputs the signals every 15 ticks.


[[Category:Blocks]]
[[Category:Blocks]]

Latest revision as of 12:24, 20 May 2024

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.