I am trying to use particle systems for the fire FX of vessel thrusters in my game, and I am interpolating their positions in a script to achieve a nice, consistent trail without having to use ps.emission.rateOverDistance which can be finnicky at the extremes (too fast / too slow). I will attach that script below. I will also share some debugging tools I use to help get a frame of reference here.
My thoughts / questions:
- I don't want to predict where the thrusters will be next frame, because this may cause problems with high speed collisions and other similar cases, but if there is an easy & reliable way to do this, I may look into it.
- Does physics running in fixedupdate() vs rendering happening in update() cause problems with physics-enabled objects rendering behind where the truly are?? I don't think this is the case but it would explain this observed behaviour.
- Why do my debug.drawlines appear to confirm that the particle systems do indeed physically lag behind the vessel in world space?
Video of debug & issue in action: https://youtu.be/uGetCXgPTOM (debug lines indicate the difference between the last position of the particle system and the current position)
(Apologies if this should be in #⚛️┃physics or #✨┃vfx-and-particles, but I felt this should be posted here since an in-script solution seems most likely to me)