- Home /
Particle System 'world' simulated: problem with velocity
I have a boat translated downwards at a certain speed so that the generated obstacles start passing by faster as time goes by.
Now I want to create some water foam behind the boat and I want it world simulated. The problem is that the particles are shooting away from the back of the boat due to its speed.
I know that I can reduce the speed of boat translation and instead add opposite translation to the parent of obstacles .. but this to me seems like 'cheating' in the game environment. Would anyone of you suggest me a better solution to create a proper particle system world simulated and which looks close to real by not emulating fast shooting particles from the back of the boat?
I assume you have the partical emitter child of the boat?. I think a nice way would be to use multiple particle emitters that are placed in world space, that drop behind the boat, these can then be destroyed / (or re-used). The nice thing here you can make the particle emitters fade away, so the particles further away from the boat will be disappearing, and of course will be leaving a nice trail behind.
Thanks for the reply $$anonymous$$pjComp! Yes it's its child. If I am understanding you well, your idea is to generate multiple particle emitters from the boat ins$$anonymous$$d of having just one generating particles. I think this is a nice idea but wouldn't this be heavy on device performance? Sorry if I'm asking stupid questions
I don't think it would be any harder on device performance, as long as you keep the particle count low. I've knocked up a simple demo that seems to works nicely.. link text
Answer by Owen-Reynolds · Oct 15, 2014 at 06:53 AM
I think this is exactly what "Inherit Velocity" is for. Say, at 0.8 water will "fall away" at 20% of the boat's speed.
Think I've only used it when the gameObject with the particleSystem also had the rigidbody, but should work as a child.
Hi Owen thanks. Your answer got me closer to what I want. The problem now is that when the boat moves to one side (using smoothdamp, from one row to the one next to it) it kinda flicks the foam to the side it moved to. This makes it really ugly. Don't know how to remove it. Is there a way?
I feel like mixing physics movement with hand-translation (I assume smoothdamp is hand-changing z, while physics pushes along x?) can always cause little problems. The physics system doesn't "know" about the other faked velocity.
I often try to do everything in rigidbodies through velocity changes. For example, while(boat.x<10) boat.velocity.x=5;
. But that doesn't always work (can get stuck on a twig.)
You could try adding a "fake" velocity. Like if you hand-set z, give the boat a useless velocity.z just to guide the the foam.
Then, particles are art. Often making more, fading and col change; 2 emitters like $$anonymous$$pj mentions (light spray + thick foam) can help.
Your answer
Follow this Question
Related Questions
Move Particles with Object but in world space (character controller) 0 Answers
Particle settings for instant / fast laser? 2 Answers
Can you still not change the Velocity of spawned particles? 2 Answers
How is Limit Velocity Over Lifetime calculated? 0 Answers
VFX Graph - Particle velocity along Cone (Position) 1 Answer