mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-03 04:20:30 +00:00
Merge pull request #497 from Azaezel/alpha40/particleBounds
particle emitter bounds box fix
This commit is contained in:
commit
91c985e518
1 changed files with 7 additions and 3 deletions
|
|
@ -1551,9 +1551,13 @@ void ParticleEmitter::updateBBox()
|
|||
|
||||
for (Particle* part = part_list_head.next; part != NULL; part = part->next)
|
||||
{
|
||||
Point3F particleSize(part->size * 0.5f, 0.0f, part->size * 0.5f);
|
||||
minPt.setMin( part->pos - particleSize );
|
||||
maxPt.setMax( part->pos + particleSize );
|
||||
for (Particle* part = part_list_head.next; part != NULL; part = part->next)
|
||||
{
|
||||
Point3F particleSize(part->size * 0.5f);
|
||||
F32 motion = getMax((part->vel.len() * part->totalLifetime / 1000.0f), 1.0f);
|
||||
minPt.setMin(part->pos - particleSize - Point3F(motion));
|
||||
maxPt.setMax(part->pos + particleSize + Point3F(motion));
|
||||
}
|
||||
}
|
||||
|
||||
mObjBox = Box3F(minPt, maxPt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue