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.

OpenXRAnalogThresholdModifier

继承: OpenXRActionBindingModifier < OpenXRBindingModifier < Resource < RefCounted < Object

模拟阈值绑定修改器能够根据指定的阈值将 float 输入修改为布尔值输入。

描述

模拟阈值绑定修改器能够根据指定的阈值将 float 输入修改为布尔值输入。

详见 XR_VALVE_analog_threshold

属性

OpenXRHapticBase

off_haptic

float

off_threshold

0.4

OpenXRHapticBase

on_haptic

float

on_threshold

0.6


属性说明

OpenXRHapticBase off_haptic 🔗

用户松开输入时发出的触觉脉冲。


float off_threshold = 0.4 🔗

  • void set_off_threshold(value: float)

  • float get_off_threshold()

输入值低于此值时,输出变为 false。


OpenXRHapticBase on_haptic 🔗

用户按下输入时发出的触觉脉冲。


float on_threshold = 0.6 🔗

  • void set_on_threshold(value: float)

  • float get_on_threshold()

输入大于等于此值时,输出变为 true。直到低于 off_threshold 都会保持为 true。