I’m developing a large world game that relies on origin shifting to avoid the floating point precision problem. However, my game involves the movement of ships which have a particle trail to simulate a boat’s wake. When I shift the origin, the particle emitters shift but the GPU particles don’t.
Is there anyway to force the particle system to reposition each particle relative to the emitter when the origin is shifted?
Unfortunately (and for perf reason) the particles when using GPUParticleSystem are not accessible by the CPU. So in your case I’m afraid you will have to rely on CPU particles and you will have to use a custom update function: https://doc.babylonjs.com/how_to/customise#custom-functions
I got halfway done and realized I do not have any way to validate if it worked or not… I have never done my own build from my branch and am kinda intimidated to try.
Might be best if you do it Delta, pretty much just needs what already posted just in the right spots.
I currently have the emitter moving with the ships (emulating a boat’s wake), but I sometimes have to shift the emitters and the particles so that my camera origin is kept at 0,0.
I changed your example (see line 50). Here, the emitter’s location shifted. And I’m hoping to have a feature that would shift the particles as well.