이 페이지에서

XrHapticFeedback QML Type

XR 컨트롤러의 햅틱 피드백을 제어합니다. 더 보기...

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

QtObject

Status: Technology preview

이 유형은 기술 미리보기 단계에 있으며 변경될 수 있습니다.

속성

방법

상세 설명

햅틱 피드백은 일반적으로 어떤 이벤트가 발생할 때 컨트롤러에 짧은 진동을 가해 촉각적 경험을 제공하는 것을 말합니다. 이를 통해 예를 들어 버튼을 누르는 듯한 착각을 줄 수 있습니다.

XrHapticFeedback을 사용하는 방법에는 두 가지가 있습니다:

  • 명령형 방식으로, ` start ` 함수를 호출하는 방법
  • trigger 을 지정하는 선언적 방식 condition

다음 코드는 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.RisingEdgetrigger 가 ` false `에서 ` true`로 변경되면 햅틱 효과가 시작됩니다.
XrHapticFeedback.TrailingEdgetrigger 가 true 에서 false 로 변경될 때 햅틱 효과가 시작됩니다.

controller : enumeration

이 햅틱 피드백이 적용될 컨트롤러입니다.

다음 중 하나일 수 있습니다:

상수값
XrHapticFeedback.LeftController
XrHapticFeedback.RightController
XrHapticFeedback.UnknownController

hapticEffect : XrHapticEffect

이 속성은 햅틱 피드백이 작동될 때 컨트롤러에 적용되는 효과를 설명합니다.

trigger : bool

햅틱 피드백의 트리거

이 속성은 햅틱 효과가 어떤 상황에 반응할지 정의합니다. ` condition ` 속성은 트리거가 어떻게 해석될지를 결정합니다.

start 및 condition도 참조하십시오 .

메서드 설명서

void start()

햅틱 피드백 효과를 시작합니다.

void stop()

햅틱 피드백 효과를 중지합니다.

© 2026 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.