engine
engine copied to clipboard
ParticleRenderer's VelocityOverLifetime velocityX velocityY velocityZ's TwoConstants Mode won't work
Describe the bug ParticleRenderer's VelocityOverLifetime velocityX velocityY velocityZ's TwoConstants Mode won't work. Its performance is the same with Constant Mode, which is not as expected. To Reproduce Steps to reproduce the behavior:
const particleRenderer = particleEntity.addComponent(ParticleRenderer);
const material = new ParticleMaterial(engine);
material.baseColor = new Color(1.0, 1.0, 1.0, 1.0);
material.blendMode = BlendMode.Additive;
particleRenderer.setMaterial(material);
particleRenderer.generator.main.startSpeed.constant = 0;
particleRenderer.generator.velocityOverLifetime.enabled = true;
particleRenderer.generator.velocityOverLifetime.velocityZ.mode =
ParticleCurveMode.TwoConstants;
particleRenderer.generator.velocityOverLifetime.velocityZ.constantMax = 10;
particleRenderer.generator.velocityOverLifetime.velocityZ.constantMin =
-10;
Expected behavior direction and speed should varies between constantMin and constantMax
Screenshots