Skip to content
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

Add support for jittered initial scale #58

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

johanhelsing
Copy link
Contributor

Mirrors implementation of initial_rotation and initial_speed

@@ -134,7 +134,8 @@ pub fn particle_spawner(
.z_value_override
.as_ref()
.map_or(0.0, |jittered_value| jittered_value.get_value(&mut rng));
let particle_scale = particle_system.scale.at_lifetime_pct(0.0);
let initial_scale = particle_system.initial_scale.get_value(&mut rng);
let particle_scale = initial_scale * particle_system.scale.at_lifetime_pct(0.0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. So this changes scale from an absolute scale to a relative, as we're always multiplying the scale value by the initial_scale. You commented to this effect on initial_scale, but maybe we should also call this out on the doc for scale, that it is relative to initial_scale.

@theanti9 theanti9 merged commit 36b4330 into abnormalbrain:main Dec 8, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants