Browse Source

fixed issue with Ray.attachToMesh not setting direction and origin when Ray.detachFromMesh is called before the scene is rendered

Adam Bowman 8 năm trước cách đây
mục cha
commit
1ebe0ee35d
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/Culling/babylon.ray.ts

+ 2 - 0
src/Culling/babylon.ray.ts

@@ -393,6 +393,8 @@
                 this._attachedToMesh.getScene().registerBeforeRender(this._updateToMeshFunction);
             }
 
+            this._updateToMesh();
+
         }
 
         public detachFromMesh(): void{