QmlDesigner: Position point light at camera

Since the camera is movable the light should follow the camera.

Change-Id: Ia9925f98288ff19a81086e52f3a31fe72b32ee99
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Thomas Hartmann
2019-10-21 09:38:21 +02:00
parent 35fe01c6e9
commit b64f5a3fe5

View File

@@ -61,8 +61,10 @@ Window {
} }
Light { Light {
id: directionalLight id: pointLight
visible: showEditLight visible: showEditLight
position: editCamera.position
lightType: Light.Point
} }
Camera { Camera {
@@ -74,7 +76,7 @@ Window {
} }
Component.onCompleted: { Component.onCompleted: {
directionalLight.setParentItem(editView.scene); pointLight.setParentItem(editView.scene);
editCamera.setParentItem(editView.scene); editCamera.setParentItem(editView.scene);
} }
} }