-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setScaleRange not working for oneShot #5
Comments
ScaleRange is the range of sizes when shot, not that they grow from 0.2 to 5. In fact when you use that code, you should see how the particles spawned are different in size. What you want to do is performed by a Modifier, specifically a ScaleModifier addModifier(new ScaleModifier(0.2f, 5f, 0, 200)) You can see how it works on the example StarsExampleActivity |
Thanks for the info. However I'm not trying to get the images to change size over their lifetime. I'm trying to get a range of sizes when the particles are created. |
Ah, sorry, I misread the issue. Then you are using it right. I'm not sure I ever tried that specific combination, so I'll take a look. |
I just fixed it, I have not made it into a release, so if you are in a hurry, just get the latest version and export the jar. |
The following code results in a particle effect where the size of the image remains fixed, when it is expected to vary in scale from 0.2 to 1.
ParticleSystem stars = new ParticleSystem(me, 50, R.drawable.star_particle, 2000);
stars.setScaleRange(0.2f, 5f);
stars.setSpeedRange(0.3f, 1f);
stars.oneShot(dials, 50);
The text was updated successfully, but these errors were encountered: