Explorar el Código

Merge pull request #14689 from Yugloocamai/patch-1

Viewport.js: fix orphaned object
Mr.doob hace 7 años
padre
commit
cc13c25604
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      editor/js/Viewport.js

+ 4 - 0
editor/js/Viewport.js

@@ -410,6 +410,10 @@ var Viewport = function ( editor ) {
 	} );
 
 	signals.objectRemoved.add( function ( object ) {
+		
+		if(object === transformControls.object){
+			transformControls.detach();
+		}
 
 		object.traverse( function ( child ) {