mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Particles should go downwind (while windCoefficient >0)
This commit is contained in:
parent
7f674a59c6
commit
07b76cbfb2
|
|
@ -1390,7 +1390,7 @@ void ParticleEmitter::emitParticles(const Point3F& start,
|
|||
|
||||
Point3F a = last_part->acc;
|
||||
a -= last_part->vel * last_part->dataBlock->dragCoefficient;
|
||||
a -= mWindVelocity * last_part->dataBlock->windCoefficient;
|
||||
a += mWindVelocity * last_part->dataBlock->windCoefficient;
|
||||
//a += Point3F(0.0f, 0.0f, -9.81f) * last_part->dataBlock->gravityCoefficient;
|
||||
a.z += -9.81f*last_part->dataBlock->gravityCoefficient; // as long as gravity is a constant, this is faster
|
||||
|
||||
|
|
@ -1750,7 +1750,7 @@ void ParticleEmitter::update( U32 ms )
|
|||
{
|
||||
Point3F a = part->acc;
|
||||
a -= part->vel * part->dataBlock->dragCoefficient;
|
||||
a -= mWindVelocity * part->dataBlock->windCoefficient;
|
||||
a += mWindVelocity * part->dataBlock->windCoefficient;
|
||||
a.z += -9.81f*part->dataBlock->gravityCoefficient; // AFX -- as long as gravity is a constant, this is faster
|
||||
|
||||
part->vel += a * t;
|
||||
|
|
|
|||
Loading…
Reference in a new issue