Przeglądaj źródła

fixed issue with Ray.detachFromMesh function

Adam Bowman 8 lat temu
rodzic
commit
84f5dc3d8a
1 zmienionych plików z 2 dodań i 1 usunięć
  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;
             }
 
         }