We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 789daa6 commit 69cd160Copy full SHA for 69cd160
jme3-core/src/main/java/com/jme3/effect/ParticleEmitter.java
@@ -1101,9 +1101,12 @@ private void updateParticleState(float tpf) {
1101
1102
lastPos.set(getWorldTranslation());
1103
1104
- BoundingBox bbox = (BoundingBox) this.getMesh().getBound();
1105
- bbox.setMinMax(min, max);
1106
- this.setBoundRefresh();
+ //This check avoids a NaN bounds when all the particles are dead during the first update.
+ if (!min.equals(Vector3f.POSITIVE_INFINITY) && !max.equals(Vector3f.NEGATIVE_INFINITY)) {
+ BoundingBox bbox = (BoundingBox) this.getMesh().getBound();
1107
+ bbox.setMinMax(min, max);
1108
+ this.setBoundRefresh();
1109
+ }
1110
1111
vars.release();
1112
}
0 commit comments