فهرست منبع

fixed issue with Ray.detachFromMesh function

Adam Bowman 8 سال پیش
والد
کامیت
84f5dc3d8a
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  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;
             }
 
         }