このページでは

LookAtNode QML Type

別のノードを常に指し続けるように自動的に設定されるヘルパーノード。詳細...

Import Statement: import QtQuick3D.Helpers
Since: Qt 6.4
Inherits:

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.