XrHapticFeedback QML Type
XR コントローラの触覚フィードバックを制御する。詳細...
Import Statement: | import QtQuick3D.Xr |
Since: | Qt 6.9 |
Inherits: | |
Status: | Technical Preview |
プロパティ
- condition : enumeration
- controller : enumeration
- hapticEffect : XrHapticEffect
- trigger : bool
方法
詳細説明
触覚フィードバックは通常、コントローラに短い振動を加えることで、イベントが発生したときに触覚体験を提供します。これにより、例えばボタンに触れたような錯覚を与えることができます。
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 |
controller : enumeration |
この触覚フィードバックが適用されるコントローラ。
以下のいずれか:
定数 | 値 |
---|---|
XrHapticFeedback.LeftController | |
XrHapticFeedback.RightController | |
XrHapticFeedback.UnknownController |
hapticEffect : XrHapticEffect |
このプロパティは、触覚フィードバックがトリガーされたときにコントローラに適用されるエフェクトを記述します。
trigger : bool |
メソッド ドキュメンテーション
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.