I am using Babylon SPS to add and remove particles that are pickable, in most cases, it works great.
However, in the following scenario, it starts to mess up the pickedParticles array and picking becomes unreliable (some particles are pickable some are not).
The steps to reproduce are as follows:
- Have an expandable and pickable SPS
- Add shapes X count
- Remove all but a few particles
- Add 2 times X particles
- Try to pick a particle
The picked particle is selected every time
In some cases, the selection selects another particle.
Demo: https://www.babylonjs-playground.com/#JKRLKH#1 (try to pick more than one particle *some work OK)
I have not yet tried to fix the bug, I think I will have some time this weekend to try and fix it.