-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix particle spread values affecting particle velocity #85880
Fix particle spread values affecting particle velocity #85880
Conversation
Other than my comment, everything else looks good. The rest matches what we had in 4.1. So this PR should be good to go as long as we aren't introducing a behaviour change to 3D now |
c5ccf66
to
6b2a1b4
Compare
Would superseed #86233 |
Yep sorry. I have seen this PR only after opening my PR that supersedes the other one. I havent tested this one yet |
@QbieShay Is there any tests in particular that I can run that can help? |
I tested this PR with my particle system from 4.1.2 and #85620 looks to be fixed. Did you have a 2D test case where there are still issues compared to 4.1.x? |
This is the original MRP for #85744 |
dcaf6d3
to
6b2a1b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge this for 4.3!
We should cherrypick this for 4.2 as well since the original bug was a regression in 4.2
Thanks! And congrats for your first merged Godot contribution 🎉 |
Resolves #85744 and partially #85620
The spread direction vector for a particle had affected the particles velocity. This was caused by
spread_direction
not being normalized before it was returned fromget_random_direction_from_spread()
. A compounding issue to this was thatget_random_direction_from_spread()
still generated a 3Dspread_direction
even whenPARTICLE_FLAG_DISABLE_Z
is set.I made changes to
get_random_direction_from_spread()
so that it:spread_direction
before returning it.