Jump to content

Swipe Sensor: Difference between revisions

m
Use infobox, and add documentation for outputs
(Created page with "Executes the output when user performs a swipe gesture. Also, outputs the swipe direction. /uploads/Swipe Sensor.png == 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. Category:Blocks ")
 
m (Use infobox, and add documentation for outputs)
Line 1: Line 1:
{{Block
|image=Swipe_Sensor.png
|type=s
|folder=Control
|input1={{Port|e|Before}}
|output1={{Port|e|Swiped}}
|output2={{Port|n|Direction}}
|output3={{Port|e|After}}
}}
Executes the output when user performs a swipe gesture. Also, outputs the swipe direction.
Executes the output when user performs a swipe gesture. Also, outputs the swipe direction.


[[width=336px|/uploads/Swipe Sensor.png]]
Outputs:
 
* Swiped: Executed only if the player swiped the screen.
* Direction: A normalized cardinal direction in the XZ plane.


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


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