WasdController QML Type
키와 마우스를 사용하여 노드의 위치와 방향을 제어하세요. 더 보기...
| Import Statement: | import QtQuick3D.Helpers |
| Inherits: |
속성
- acceptedButtons : enumeration
- backSpeed : real
- controlledObject : QtQuick3D::Node
- downSpeed : real
- forwardSpeed : real
- inputsNeedProcessing : bool
- keysEnabled : bool
- leftSpeed : real
- mouseEnabled : bool
- rightSpeed : real
- shiftSpeed : real
- speed : real
- upSpeed : real
- xInvert : bool
- xSpeed : real
- yInvert : bool
- ySpeed : real
상세 설명
이 헬퍼를 사용하면 W, A, S, D 키, 방향키 및 마우스를 통해 노드를 제어할 수 있습니다. 일반적으로 제어 대상 노드는 ` controlledObject ` 속성에 지정된 카메라입니다.
WasdController를 추가하면, 장면을 탐색하는 표준 방식을 제공하려는 애플리케이션은 물론, 개발 및 문제 해결 과정에서 임시 조치로도 매우 유용할 수 있습니다. 이는 익숙한 키보드 및 마우스 조작을 통해 실행 시점에 장면을 확인할 수 있게 해주기 때문입니다.
키 바인딩은 다음과 같습니다:
Wup- 앞으로 이동Sdown- 뒤로 이동Aleft- 왼쪽으로 이동Dright- 오른쪽으로 이동Rpage up- 위로 이동F또는page down- 아래로 이동shift다른 키와 함께 사용하면 - 상황에 따라 더 빠르게 이동 shiftSpeed
다음 코드 조각은 WasdController 객체를 추가하는 방법을 보여줍니다. 기본적으로 키와 마우스 기반 탐색이 모두 활성화되어 있으므로, 대부분의 경우 추가 설정이 필요하지 않습니다:
View3D {
anchors.fill: parent
camera: camera
PerspectiveCamera {
id: camera
position: Qt.vector3d(0, 0, 600)
}
...
}
WasdController {
controlledObject: camera
}속성 설명
acceptedButtons : enumeration [default: Qt.LeftButton]
컨트롤러에서 지원하는 버튼을 지정합니다.
DragHandler 및 MultiPointHandler도 참조하십시오 .
backSpeed : real [default: 5]
뒤로 가기 키를 누를 때의 이동 속도를 지정합니다.
controlledObject : QtQuick3D::Node
제어할 노드를 지정합니다. 일반적으로 카메라 객체입니다.
downSpeed : real [default: 5]
아래쪽 화살표 키를 누를 때의 이동 속도를 지정합니다.
forwardSpeed : real [default: 5]
앞으로 가기 키를 누를 때의 이동 속도를 지정합니다.
inputsNeedProcessing : bool [read-only]
처리해야 할 입력이 있을 때 이 속성은 true가 됩니다.
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축 방향으로 이동할 때의 이동 속도를 지정합니다.
© 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.