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

Incorrect rendering of World-space simulated particles while animating scale #285

Closed
jakeoconnor-peoplefun opened this issue Dec 19, 2023 · 3 comments
Assignees
Labels
bug Something isn't working released

Comments

@jakeoconnor-peoplefun
Copy link
Contributor

Describe the bug

When animating the scale of a UIParticle's parent, the behavior of the UIParticle is inconsistent with the behavior of a normal Unity ParticleSystem. This inconsistency prevents artists from cleanly using UIParticle in the way they would use ParticleSystem normally, such as adding a sparkle trail to a flying object.
UIParticle tries to scale itself to account for the parent scale changing, but doing so causes stretching and flattening of the particles which should remain at a consistent scale and position in World-space.

To Reproduce

Steps to reproduce the behavior:

  1. Create a ParticleSystem with World simulation space.
  2. Add an empty GameObject parent to the ParticleSystem, then add the UIParticle component.
  3. Add an empty GameObject parent to the UIParticle.
  4. Animate the parent-most GameObject's position and scale (tween, update, animator, etc.)

Expected behavior

World-space simulation particles linger behind the animated object leaving a trail, as they do with normal ParticleSystems implemented the same way.

Screenshots

Screen.Recording.2023-12-19.at.2.32.08.PM.mov

Environment

  • Package version 4.4.0
  • Platform: Editor(Mac)
  • Unity version: 2021.3.25f1
  • Project options: IL2CPP, .Net Framework

Additional context

@jakeoconnor-peoplefun jakeoconnor-peoplefun added the bug Something isn't working label Dec 19, 2023
@mob-sakai
Copy link
Owner

Hi @jakeoconnor-peoplefun , thank you for your reporting!
I was able to reproduce this issue in my environment as well.
This issue is occurring due to UIParticleRenderer.ResolveResolutionChange.
This method prevents particles simulated in world space from moving when the canvas resolution changes, but it was causing the same behavior with scale animations.

@jakeoconnor-peoplefun
Copy link
Contributor Author

Amazing! Thank you for looking into it so quickly. Our VFX artists will be happy to hear that there's progress.

github-actions bot pushed a commit that referenced this issue Dec 23, 2023
# [4.5.0](4.4.0...4.5.0) (2023-12-23)

### Bug Fixes

* incorrect rendering of world-space simulated particles while animating scale ([ac58475](ac58475)), closes [#285](#285)
* remove obsolete warning ([5d5eb34](5d5eb34))

### Features

* Automatically generated objects are no longer editable (NotEditable). ([5607dc4](5607dc4))
* support IMeshModifier ([5c3232f](5c3232f)), closes [#282](#282)
Copy link

🎉 This issue has been resolved in version 4.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

2 participants