LookAtNode QML Type
다른 노드를 가리키도록 자동으로 유지되는 헬퍼 노드입니다. 더 보기...
| Import Statement: | import QtQuick3D.Helpers |
| Since: | Qt 6.4 |
| Inherits: |
속성
- target : Node
상세 설명
이 헬퍼는 지정된 노드를 항상 향하도록 자동으로 회전하는 노드를 구현합니다. 회전은 X축과 Y축에서만 이루어집니다.
예를 들어, 다음 코드 조각은 원기둥이 항상 큐브를 향하도록 유지합니다.
View3D {
anchors.fill: parent
camera: camera
PerspectiveCamera {
id: camera
}
DirectionalLight {}
LookAtNode {
target: cube
Model {
id: cylinder
source: "#Cone"
eulerRotation.x: -90
materials: [
PrincipledMaterial {}
]
}
}
Model {
id: cube
position: Qt.vector3d(300, 300, 0);
source: "#Cube"
materials: [ PrincipledMaterial {} ]
}
}속성 설명
target : Node
조사할 대상 노드를 지정합니다. 기본값은 null 입니다.
© 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.