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

Fix turbulence post rework #84103

Merged
merged 1 commit into from
Oct 28, 2023
Merged

Conversation

QbieShay
Copy link
Contributor

@QbieShay QbieShay commented Oct 28, 2023

Turbulence wasn't correctly altering the velocity vector which caused flickering with interpolation and disruption of the noise pattern.
Additionally, scale for 2D is now more usable in the inspector.
Soft compat breakage with existing 2D particles that use turbulence.

Video of the visual change:

2023-10-28.11-40-12.mp4
2023-10-28.12-24-12.mp4

@QbieShay QbieShay added this to the 4.2 milestone Oct 28, 2023
@akien-mga akien-mga changed the title fixed turbulence post rework. improved scale Fix turbulence post rework, improve scale Oct 28, 2023
@akien-mga akien-mga changed the title Fix turbulence post rework, improve scale Fix turbulence post rework, improve 2D scale Oct 28, 2023
@QbieShay
Copy link
Contributor Author

After having a conversation with @RPicster , we decided to move the scale changes out of this PR.

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

I don't really have enough knowledge about the turbulence code to give a substantive approval. The code changes look fine to me and I don't think they will have unintended consequences in other parts of the code.

What I can't say is whether the behavioral change is desirable or aligns better with how things worked in 4.1.x.

Would be helpful to have @RPicster's approval as well

@QbieShay
Copy link
Contributor Author

More detail on what was happening:

The turbulence change of direction was applied only to the combined value of animated velocities and velocity, but velocity was never updated. This was causing the interpolation code to flicker the particle back and forth. Additionally, this was "holding back" the turbulence from properly forming patterns because the particles were constantly pulled in different directions.

@akien-mga
Copy link
Member

The commit message should be amended if it no longer includes scale changes.

@akien-mga akien-mga changed the title Fix turbulence post rework, improve 2D scale Fix turbulence post rework Oct 28, 2023
@akien-mga akien-mga merged commit 9144457 into godotengine:master Oct 28, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants