소스 검색

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.