LookAtNode QML Type
Nodo auxiliar que se mantiene automáticamente apuntando a otro nodo. Más...
| Import Statement: | import QtQuick3D.Helpers |
| Since: | Qt 6.4 |
| Inherits: |
Propiedades
- target : Node
Descripción detallada
Este helper implementa un nodo que rota automáticamente de forma que siempre apunta hacia un nodo especificado. La rotación sólo ocurre sobre los ejes X e Y.
Por ejemplo, el siguiente fragmento mantiene el cilindro apuntando al cubo.
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 {} ]
}
}Documentación de Propiedades
target : Node
Especifica el nodo de destino a buscar. El valor por defecto es 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.