Explorar o código

viewport camera insync w. SCENE (#28297)

ycw hai 1 ano
pai
achega
1289401e86
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      editor/js/Viewport.Controls.js

+ 9 - 0
editor/js/Viewport.Controls.js

@@ -46,6 +46,15 @@ function ViewportControls( editor ) {
 
 	signals.cameraAdded.add( update );
 	signals.cameraRemoved.add( update );
+	signals.objectChanged.add( function ( object ) {
+
+		if ( object.isCamera ) {
+
+			update();
+
+		}
+
+	} );
 
 	// shading