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 프로퍼티에 지정된 카메라 노드입니다.
와스드 컨트롤러를 추가하면 익숙한 키보드 및 마우스 탐색을 통해 런타임에 씬을 검사할 수 있으므로 씬을 탐색하는 표준 방법을 제공하려는 애플리케이션과 개발 및 문제 해결 중 임시 조치로 매우 유용할 수 있습니다.
키 바인딩은 다음과 같습니다:
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 |
컨트롤러가 허용하는 버튼을 지정합니다.
DragHandler 및 MultiPointHandler 을참조하세요 .
backSpeed : real |
뒤로 키를 눌렀을 때 탐색 속도를 지정합니다.
controlledObject : QtQuick3D::Node |
제어할 노드를 지정합니다. 일반적으로 카메라 객체입니다.
downSpeed : real |
아래쪽 키를 눌렀을 때 탐색 속도를 지정합니다.
forwardSpeed : real |
앞으로 키를 눌렀을 때 탐색 속도를 지정합니다.
inputsNeedProcessing : bool |
이 속성은 처리가 필요한 입력이 있는 경우에 해당합니다.
keysEnabled : bool |
키 컨트롤을 활성화합니다. 기본값은 true입니다.
leftSpeed : real |
왼쪽 키를 눌렀을 때 탐색 속도를 지정합니다.
mouseEnabled : bool |
마우스 컨트롤을 활성화합니다. 기본값은 참입니다.
rightSpeed : real |
오른쪽 키를 누를 때 탐색 속도를 지정합니다.
shiftSpeed : real |
Shift 키를 누를 때 활성화되는 속도 배율을 지정합니다.
speed : real |
탐색 속도를 지정합니다.
upSpeed : real |
위쪽 키를 눌렀을 때 탐색 속도를 지정합니다.
xInvert : bool |
X축 컨트롤을 반전합니다. 기본값은 false입니다.
xSpeed : real |
마우스를 X축을 따라 이동할 때 탐색 속도를 지정합니다.
yInvert : bool |
Y축 컨트롤을 반전합니다. 기본값은 참입니다.
ySpeed : real |
마우스를 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.