Swipe Event

An asset by burstina
The page banner background of a mountain and forest
Swipe Event thumbnail image
Swipe Event thumbnail image
Swipe Event thumbnail image
Swipe Event hero image

Quick Information

0 ratings
Swipe Event icon image
burstina
Swipe Event

Swipe Event Class.This asset provides a new Class node "SwipeEventModule" meant to generate "InputEventSwipe" event, who is not provided by the engine.https://github.com/burstina/SwipeEvent

Supported Engine Version
3.1
Version String
1.0b
License Version
MIT
Support Level
community
Modified Date
5 years ago
Git URL
Issue URL

SwipeEvent

Swipe Event Module for Godot Engine

README img2

Property Description
Swipe Time Max Time limit to detect if the gesture is a swipe or a drag
Tollerance Time tollerance between frames to adjust swipe detection
Bound to Parent If TRUE, detection will affect only parent node. That means: event.get_target() = parent_node NOTE:It has to ba any Control node to run smoothly. (if parent is not a Control node, you have to call Activate() and Deactivate() by yourself
Cumulative Drag (Pretty experimental) If detection engine doesn't detect a swipe, only a single cumulative drag event has to be trasmitted
Drag while Swipe Doesn't suppress Drag events while the engine are trying to detect swipes
Call deferred If TRUE, swipe engine submits events as deferred calls

InputEventSwipe

Event generated by SwipeEvent core module.

Type Function Name Description
Vector2 get_direction() Real swipe direction. x and y are always fully loaded with values
Vector2 get_speed() Computed swipe speed, in points per second
Node get_target() if Bound to Parent is true, it returns parent node, otherwise returns null
bool left() Returns TRUE if swipe direction is heading left
bool right() Returns TRUE if swipe direction is heading right
bool up() Returns TRUE if swipe direction is heading up
bool down() Returns TRUE if swipe direction is heading down

Followind example shows how to check SwipeEvent in parent (Control) node:

README img1

SceneTree build example SwipeEventDemo

Followind example shows how to use SwipeModule in scene tree. This picture shows three TextureRect nodes, each one with its own SwipeModule node, bacause we want all three TextureRect to be swiped.

README img1

Swipe Event Class.
This asset provides a new Class node "SwipeEventModule" meant to generate "InputEventSwipe" event, who is not provided by the engine.

https://github.com/burstina/SwipeEvent

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Swipe Event icon image
burstina
Swipe Event

Swipe Event Class.This asset provides a new Class node "SwipeEventModule" meant to generate "InputEventSwipe" event, who is not provided by the engine.https://github.com/burstina/SwipeEvent

Supported Engine Version
3.1
Version String
1.0b
License Version
MIT
Support Level
community
Modified Date
5 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers