Quote:Original post by b_thangvn
should I model the spark in world space or in model space? I can see each has advantages and disadvantages:
I would go world space, then you can handle all particles using the same sytems and reference points.
In terms of how the particles would move (from the initial collision), there would be a random distribution of velocities between the two surfaces, centred on the half way point.
E.g if the car's bodywork (travelling at say 20m.s^-1) is colliding with a static wall, the particles would generally be travelling at around the 10m.s^-1 mark. The spread of velocities would depend on the reletive hardness of the surfaces and drag co-efficents, and would really be treated as an empirical value. It's something you can play around with to get it looking right.
If you have two cars colliding , one travelling at 20m.s^1 and one at 10m.s^-1, the central point would be 15m.s^-1
You could start of with this formula and modify for dramatic effect.
Vp=(V1 - V2)/drag + V2 + rand * spread
Play around with values of drag (starting at around 2.0f) and spread.
rand should be a random number between -0.1 and +0.1
Note that these should be vector values.