瀏覽代碼

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{
         public detachFromMesh(): void{
 
 
             if(this._attachedToMesh){
             if(this._attachedToMesh){
-                this._attachedToMesh.getScene().unregisterBeforeRender(this._renderFunction);
+                this._attachedToMesh.getScene().unregisterBeforeRender(this._updateToMeshFunction);
                 this._attachedToMesh = null;
                 this._attachedToMesh = null;
+                this._updateToMeshFunction = null;
             }
             }
 
 
         }
         }