瀏覽代碼

UnIndexed picking fix

Support picking for instance of unIndexed mesh,

(Hopefully a fix, PG throws odd error without a empty setter function, https://playground.babylonjs.com/indexStable.html#8QNBES#6)

PG's; Left mesh is indexed sphere, Center mesh is original unIndexed, right mesh is instance. (see console)
With; https://playground.babylonjs.com/indexStable.html#8QNBES#8
Without; https://playground.babylonjs.com/indexStable.html#8QNBES#7
aWeirdo 6 年之前
父節點
當前提交
73049f294a
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/Meshes/instancedMesh.ts

+ 4 - 0
src/Meshes/instancedMesh.ts

@@ -252,6 +252,10 @@ export class InstancedMesh extends AbstractMesh {
     public get _positions(): Nullable<Vector3[]> {
         return this._sourceMesh._positions;
     }
+    
+    public get _unIndexed(): boolean {
+        return this._sourceMesh._unIndexed;
+    }
 
     /**
      * This method recomputes and sets a new BoundingInfo to the mesh unless it is locked.