InputEventScreenDrag

Inherits: InputEventFromWindow < InputEvent < Resource < RefCounted < Object

Represents a screen drag event.

Description

Stores information about screen drag events. See Node._input.

Tutorials

Properties

int

index

0

bool

pen_inverted

false

Vector2

position

Vector2(0, 0)

float

pressure

0.0

Vector2

relative

Vector2(0, 0)

Vector2

tilt

Vector2(0, 0)

Vector2

velocity

Vector2(0, 0)


Property Descriptions

int index = 0

  • void set_index ( int value )

  • int get_index ( )

The drag event index in the case of a multi-drag event.


bool pen_inverted = false

  • void set_pen_inverted ( bool value )

  • bool get_pen_inverted ( )

Returns true when using the eraser end of a stylus pen.


Vector2 position = Vector2(0, 0)

The drag position.


float pressure = 0.0

  • void set_pressure ( float value )

  • float get_pressure ( )

Represents the pressure the user puts on the pen. Ranges from 0.0 to 1.0.


Vector2 relative = Vector2(0, 0)

The drag position relative to the previous position (position at the last frame).


Vector2 tilt = Vector2(0, 0)

Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from -1.0 to 1.0 for both axes.


Vector2 velocity = Vector2(0, 0)

The drag velocity.

Previous Next


© Copyright 2014-present Juan Linietsky, Ariel Manzur and the Godot community (CC BY 3.0). Revision 53e837c6.

Built with Sphinx using a theme provided by Read the Docs.