소스 검색

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;
             }
 
         }