Explorar el Código

fixed issue with Ray.detachFromMesh function

Adam Bowman hace 8 años
padre
commit
84f5dc3d8a
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/Culling/babylon.ray.ts

+ 2 - 1
src/Culling/babylon.ray.ts

@@ -398,8 +398,9 @@
         public detachFromMesh(): void{
 
             if(this._attachedToMesh){
-                this._attachedToMesh.getScene().unregisterBeforeRender(this._renderFunction);
+                this._attachedToMesh.getScene().unregisterBeforeRender(this._updateToMeshFunction);
                 this._attachedToMesh = null;
+                this._updateToMeshFunction = null;
             }
 
         }