XrHapticFeedback QML Type

XR コントローラの触覚フィードバックを制御する。詳細...

Import Statement: import QtQuick3D.Xr
Since: Qt 6.9
Inherits:

QtObject

Status: Technical Preview

プロパティ

方法

詳細説明

触覚フィードバックは通常、コントローラに短い振動を加えることで、イベントが発生したときに触覚体験を提供します。これにより、例えばボタンに触れたような錯覚を与えることができます。

XrHapticFeedbackを使用するには2つの方法があります:

次のコードは、someObject.hit プロパティの値がfalse からtrue に変化したときに、右側のコントローラを振動させます:

XrHapticFeedback {
    controller: XrHapticFeedback.RightController
    condition: XrHapticFeedback.RisingEdge
    trigger: someObject.hit
    hapticEffect: XrSimpleHapticEffect {
        amplitude: 0.5
        duration: 300
        frequency: 3000
    }
}

プロパティのドキュメント

condition : enumeration [default: XrHapticFeedback.RisingEdge]

この触覚フィードバックをトリガーする条件。

このプロパティは、trigger プロパティの解釈方法を指定します。

以下のいずれかになります:

定数説明
XrHapticFeedback.RisingEdgeハプティック効果は、triggerfalse からtrue に変化したときに開始する。
XrHapticFeedback.TrailingEdgeハプティック効果は、triggertrue からfalse に変わったときに開始します。

controller : enumeration

この触覚フィードバックが適用されるコントローラ。

以下のいずれか:

定数
XrHapticFeedback.LeftController
XrHapticFeedback.RightController
XrHapticFeedback.UnknownController

hapticEffect : XrHapticEffect

このプロパティは、触覚フィードバックがトリガーされたときにコントローラに適用されるエフェクトを記述します。


trigger : bool

ハプティックフィードバックのトリガー

このプロパティは、ハプティック効果が何に反応するかを定義します。condition プロパティは、トリガの解釈方法を決定します。

start およびconditionも参照してください


メソッド ドキュメンテーション

void start()

触覚フィードバック効果を開始する


void stop()

触覚フィードバック効果を停止する


© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.