Hello everyone!
I have been toying with particle systems and it seems the custom update function has no effect:
I managed to make the stretching effect from How to create a Particle Stretch Effect for Warp Speed in a simpler way by using BILLBOARDMODE_STRETCHED
for the particles instead of changing the angle.
In this playground I have a spaceship (the cube focused by the camera) that is going through the warp tunnel and the emitter of the tunnel (the other cube).
As the emitter is attached to the spaceship, particles world velocity are their initial velocity plus the velocity of the spaceship.
This is problematic because the effect breaks down rapidly when the velocity of the ship increases.
This could be mitigated by using isLocal=true
for the particle system but then the tunnel would behave unnaturaly when rotating the spaceship (with IJKL) as their would be no bending of the trajectory of the particles.
What I want to do is artificially remove the velocity of the spaceship by updating the positions of the particles each frame. Subtracting the displacement of the ship should do the trick I think.
I am trying to change the positions in the onBeforeRenderObservable
and I am not getting a lot of success.
I also tried using a custom update function but it also seems to have no effect.
Does someone know what I am doing wrong here?