Swipe Sensor: Difference between revisions

From Fancade Wiki
(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 ")
 
mNo edit summary
 
(One intermediate revision by the same user not shown)
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 ==
Line 7: Line 20:
* 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 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.