c++ - Particle stream should be the same length regardless of emitter speed -
I am writing a particle system for our student gaming, and I have participated in a little problem i I want to improve the effect, but I could not find out how.
Here's how the impact on a stable ship looks:
And it looks on a moving ship:
< P> Flames should consistently have the same length. Here
particle
's tick
function: zero particle: tick (float a_DT) {// temporarily view the effect The remaining code is more explicitly set to // m_Pos + = m_Vel; If (m_Owner) {m_Pos + = m_Owner-> GetParentSpeed (); } M_Life - = 1; If (m_Life <= 0) {m_Alive = false; }}
Thanks in advance.
EDIT: To clean things, I should have a mark of effect, but I want to keep it in the same way with the speed of emitter.
You're doing that particles fast or slow moves according to the speed of the original leg, but their Life is certain that you reduce any one till you reach zero, right?
What you probably want to do is set the distance to a distance value, instead of a distance, . Then, reduce the speed of the ship (or whatever you are adding to each particle on each tune) from throughout life. When life becomes negative, then kill the particle.
I think what you want ... but if you make two changes in your algorithm then it can be a cooler (more realistic):
-
Current behavior (tail length) is correct If is the motion of the particle coming from your engine based on emphasis (acceleration rather than just speed).
-
Once a particle leaves the engine, there is no change in the speed / direction of the vessel. Once the particle gets exhausted, the motion and direction are fixed until it gets out. When you are turning the ship, or dramatically change the acceleration, it should look really good.
Cheers.
Comments
Post a Comment