Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

InputEventGesture

继承: InputEventWithModifiers < InputEventFromWindow < InputEvent < Resource < RefCounted < Object

派生: InputEventMagnifyGesture, InputEventPanGesture

触摸手势的抽象基类。

描述

用户在触摸屏上执行支持的手势时会发送 InputEventGesture。无法用鼠标模拟手势,因为手势一般都要求多点触控。

教程

属性

Vector2

position

Vector2(0, 0)


属性说明

Vector2 position = Vector2(0, 0)

相对于Viewport的本地手势位置。如果在Control._gui_input中使用,位置是相对于当前接收该手势的控件Control而言的。