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.

OpenXRHapticVibration

繼承: OpenXRHapticBase < Resource < RefCounted < Object

振動觸覺回饋。

說明

該觸覺回饋資源能夠定義基於振動的觸覺回饋脈衝,該脈衝可以通過 OpenXR 動作映射中的動作觸發。

屬性

float

amplitude

1.0

int

duration

-1

float

frequency

0.0


屬性說明

float amplitude = 1.0 🔗

  • void set_amplitude(value: float)

  • float get_amplitude()

脈衝的幅度,在 0.0 和 1.0 之間。


int duration = -1 🔗

  • void set_duration(value: int)

  • int get_duration()

脈衝的持續時間,單位為納秒。使用 -1 表示目前 XR 執行時的最小持續時間脈衝。


float frequency = 0.0 🔗

  • void set_frequency(value: float)

  • float get_frequency()

脈衝的頻率,單位為赫茲。0.0 會讓 XR 執行時為所使用的裝置選擇最佳頻率。