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.

InputEventJoypadMotion

繼承: InputEvent < Resource < RefCounted < Object

代表遊戲手柄的軸運動(例如搖桿和模擬扳機)。

說明

儲存關於搖桿運動的資訊。一個 InputEventJoypadMotion 一次代表一個軸。遊戲手柄按鈕見 InputEventJoypadButton

教學

屬性

JoyAxis

axis

0

float

axis_value

0.0


屬性說明

JoyAxis axis = 0 🔗

Axis identifier.


float axis_value = 0.0 🔗

  • void set_axis_value(value: float)

  • float get_axis_value()

操縱桿在給定軸上的目前位置。該值範圍從 -1.01.0。值為 0 意味著軸處於靜止位置。