Hi,
I can’t update the GPUPick meshes list, when I do so I get errors regarding instances, material or _internalMeshDataInfo being undefined. The PG below creates a new sphere after 1 sec.
Playground: Babylon.js Playground
Hi,
I can’t update the GPUPick meshes list, when I do so I get errors regarding instances, material or _internalMeshDataInfo being undefined. The PG below creates a new sphere after 1 sec.
Playground: Babylon.js Playground
Updated PG: using an array copy of scene.meshes based on:Passing scene.meshes to GPUPicker.setPickingList will clear them when GPUPicker.dispose - #4 by kzhsw
But still can’t update the list.
The problem seems to be with scene.onNewMeshAddedObservable whenever the code for the GPUPicker is there it fails. How can I update the GPUGPicker list after a new mesh is created?
I tried checking with onReady() and setting the param to true as well, no luck
Just give to the picker one frame to be ready after the observable is raised - https://playground.babylonjs.com/#YU2IJ5#14
Thank you, this does it. Wish there was a more explicit way of doing this but it works
Perplexity: It seems that you are encountering a problem with the GPU Picker in Babylon.js. Based on the search results and the latest information from the Babylon.js forum, we should make some adjustments. Here is a revised approach:
Example with one extra observer - https://playground.babylonjs.com/#YU2IJ5#15
Is there an attribute of gpuPicker that gives me back the point that was hit or do I have to use a ray?
Not yet, but there are some discussions with working PGs available: Get Picked Position from GPU Pick Discussion
Also this one: GPU picking point and normal example - #35 by xiehangyun