WasdController QML Type

키와 마우스로 노드 위치 및 방향을 제어합니다. 더 보기...

Import Statement: import QtQuick3D.Helpers
Inherits:

Item

속성

상세 설명

이 도우미를 사용하면 W, A, S, D, 화살표 키 및 마우스를 사용하여 노드를 제어할 수 있습니다. 일반적으로 제어되는 노드는 controlledObject 프로퍼티에 지정된 카메라 노드입니다.

와스드 컨트롤러를 추가하면 익숙한 키보드 및 마우스 탐색을 통해 런타임에 씬을 검사할 수 있으므로 씬을 탐색하는 표준 방법을 제공하려는 애플리케이션과 개발 및 문제 해결 중 임시 조치로 매우 유용할 수 있습니다.

키 바인딩은 다음과 같습니다:

  • W 또는 up - 앞으로 이동
  • S 또는 down - 뒤로 가기
  • A 또는 left - 왼쪽으로 스트라이프
  • D 또는 right - 오른쪽으로 이동
  • R 또는 page up - 위로 이동
  • F 또는 page down - 아래로 이동
  • shift 다른 키와 함께 -에 따라 더 빠르게 이동합니다. shiftSpeed

다음 스니펫은 와스드컨트롤러 객체를 추가하는 방법을 보여줍니다. 기본적으로 키와 마우스 기반 탐색이 모두 활성화되어 있으므로 대부분의 경우 추가 구성이 필요하지 않습니다:

View3D {
    anchors.fill: parent
    camera: camera
    PerspectiveCamera {
        id: camera
        position: Qt.vector3d(0, 0, 600)
    }
    ...
}

WasdController {
    controlledObject: camera
}

속성 문서

acceptedButtons : enumeration [default: Qt.LeftButton]

컨트롤러가 허용하는 버튼을 지정합니다.

DragHandlerMultiPointHandler참조하세요 .


backSpeed : real [default: 5]

뒤로 키를 눌렀을 때 탐색 속도를 지정합니다.


controlledObject : QtQuick3D::Node

제어할 노드를 지정합니다. 일반적으로 카메라 객체입니다.


downSpeed : real [default: 5]

아래쪽 키를 눌렀을 때 탐색 속도를 지정합니다.


forwardSpeed : real [default: 5]

앞으로 키를 눌렀을 때 탐색 속도를 지정합니다.


inputsNeedProcessing : bool [read-only]

이 속성은 처리가 필요한 입력이 있는 경우에 해당합니다.


keysEnabled : bool [default: true]

키 컨트롤을 활성화합니다.


leftSpeed : real [default: 5]

왼쪽 키를 눌렀을 때 탐색 속도를 지정합니다.


mouseEnabled : bool [default: true]

마우스 컨트롤을 활성화합니다.


rightSpeed : real [default: 5]

오른쪽 키를 눌렀을 때 탐색 속도를 지정합니다.


shiftSpeed : real [default: 3]

Shift 키를 누를 때 활성화되는 속도 배율을 지정합니다.


speed : real [default: 1]

탐색 속도를 지정합니다.


upSpeed : real [default: 5]

위쪽 키를 눌렀을 때 탐색 속도를 지정합니다.


xInvert : bool [default: false]

X축 컨트롤을 반전합니다.


xSpeed : real [default: 0.1]

마우스를 X축을 따라 이동할 때 탐색 속도를 지정합니다.


yInvert : bool [default: true]

Y축 컨트롤을 반전합니다.


ySpeed : real [default: 0.1]

마우스를 Y축을 따라 이동할 때 탐색 속도를 지정합니다.


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