@@ -149,12 +149,12 @@ impl CameraController {
149149 pub fn new (
150150 graph : & mut Graph ,
151151 root : Handle < Node > ,
152- settings : Option < & SceneCameraSettings > ,
152+ settings : & Settings ,
153+ camera_settings : SceneCameraSettings ,
153154 grid : Handle < Node > ,
154155 editor_objects_root : Handle < Node > ,
155156 scene_content_root : Handle < Node > ,
156157 ) -> Self {
157- let settings = settings. cloned ( ) . unwrap_or_default ( ) ;
158158 let camera;
159159 let camera_hinge;
160160 let pivot = PivotBuilder :: new (
@@ -168,7 +168,8 @@ impl CameraController {
168168 ] )
169169 . with_name ( "EditorCamera" ) ,
170170 )
171- . with_projection ( settings. projection )
171+ . with_projection ( camera_settings. projection )
172+ . with_exposure ( settings. camera . exposure )
172173 . with_z_far ( 512.0 )
173174 . build ( graph) ;
174175 camera
@@ -179,7 +180,7 @@ impl CameraController {
179180 . with_name ( "EditorCameraPivot" )
180181 . with_local_transform (
181182 TransformBuilder :: new ( )
182- . with_local_position ( settings . position )
183+ . with_local_position ( camera_settings . position )
183184 . build ( ) ,
184185 ) ,
185186 )
@@ -192,8 +193,8 @@ impl CameraController {
192193 pivot,
193194 camera_hinge,
194195 camera,
195- yaw : settings . yaw ,
196- pitch : settings . pitch ,
196+ yaw : camera_settings . yaw ,
197+ pitch : camera_settings . pitch ,
197198 mouse_control_mode : MouseControlMode :: None ,
198199 z_offset : DEFAULT_Z_OFFSET ,
199200 move_left : false ,
@@ -576,6 +577,8 @@ impl CameraController {
576577
577578 let camera = graph[ self . camera ] . as_camera_mut ( ) ;
578579
580+ camera. set_exposure ( settings. camera . exposure ) ;
581+
579582 match camera. projection_value ( ) {
580583 Projection :: Perspective ( _) => {
581584 let global_transform = camera. global_transform ( ) ;
0 commit comments