Explorar o código

fixed issue with Ray.detachFromMesh function

Adam Bowman %!s(int64=8) %!d(string=hai) anos
pai
achega
84f5dc3d8a
Modificáronse 1 ficheiros con 2 adicións e 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;
             }
 
         }