Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
InputEventScreenDrag¶
继承: InputEventFromWindow < InputEvent < Resource < RefCounted < Object
代表屏幕拖拽事件。
描述¶
存放与屏幕拖拽事件相关的信息。见 Node._input。
教程¶
属性¶
|
||
|
||
|
||
|
||
|
||
|
||
|
属性说明¶
int index = 0
多次拖动事件中的拖动事件索引。
bool pen_inverted = false
正在使用手写笔的橡皮端时,会返回 true
。
Vector2 position = Vector2(0, 0)
拖拽的位置。
float pressure = 0.0
表示用户对笔施加的压力。范围从 0.0
到 1.0
。
Vector2 relative = Vector2(0, 0)
相对于之前位置(上一帧时的位置)的拖拽位置。
Vector2 tilt = Vector2(0, 0)
代表笔的倾斜角度。正的 X 坐标值表示向右倾斜。正的Y坐标值表示向用户自身倾斜。两个轴的范围是 -1.0
到 1.0
。
Vector2 velocity = Vector2(0, 0)
拖拽的速度。