forked from qt-creator/qt-creator
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:
@@ -61,8 +61,10 @@ Window {
|
||||
}
|
||||
|
||||
Light {
|
||||
id: directionalLight
|
||||
id: pointLight
|
||||
visible: showEditLight
|
||||
position: editCamera.position
|
||||
lightType: Light.Point
|
||||
}
|
||||
|
||||
Camera {
|
||||
@@ -74,7 +76,7 @@ Window {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
directionalLight.setParentItem(editView.scene);
|
||||
pointLight.setParentItem(editView.scene);
|
||||
editCamera.setParentItem(editView.scene);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user