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

Attractor inconsistent speed #250

Closed
PeterBacall opened this issue Feb 16, 2023 · 1 comment
Closed

Attractor inconsistent speed #250

PeterBacall opened this issue Feb 16, 2023 · 1 comment
Assignees
Labels
bug Something isn't working released

Comments

@PeterBacall
Copy link

PeterBacall commented Feb 16, 2023

I'm using the attractor to attract particles. When dialing in the "Max Speed" of the attractor, I noticed it was inconsistent: when moving towards the attractor they would either move fast or very slowly depending on the FPS. In some areas the game would reach 300 FPS, and other areas 180-220 FPS, which resulted in different particle speeds.

To Reproduce
Steps to reproduce the behavior:

  1. Download the demo project and go to the "UIParticle_Demo" scene
  2. Important, disable V-SYNC for the following test
  3. Test different target frame rates by adding the script below to Start(), hit Play. Test different target frame rates.
    Application.targetFrameRate = 10; // will make the particles move slowly Application.targetFrameRate = 300; // will make the particles move very quickly
  4. You can also test different "Max Speeds", it's hard to get it right... e.g. Max Speed 10 will be too fast for 300 fps, but Max Speed 1 will be too slow for 10 FPS etc.

Note:
Sometimes there's a very huge difference, and sometimes less, depends on UI, screen refresh rate, setup etc.

Expected behavior
Consistent speed, accounting for the FPS drops etc, so there's always a reliable speed.

  • Version: 4.1.7
  • Platform: macOS Ventura
  • Unity version: Unity 2022.2.6f1 using Metal
  • Build options: URP
@PeterBacall PeterBacall added the bug Something isn't working label Feb 16, 2023
github-actions bot pushed a commit that referenced this issue Aug 18, 2023
# [4.2.0](4.1.7...4.2.0) (2023-08-18)

### Bug Fixes

* assertion 'ps->array_size()' in UpdateMesh() when using trails of type ribbon ([f75fcce](f75fcce)), closes [#241](#241)
* built-in shaders are no longer supported ([c2119c1](c2119c1)), closes [#233](#233) [#257](#257)
* crash occurs when too many vertices are rendered ([723a04d](723a04d))
* error: SerializedObject target has been destroyed ([e930516](e930516)), closes [#267](#267)
* excessive particle emitted on move ParticleSystem for local space simulation and emission over distance ([2fe0bde](2fe0bde)), closes [#265](#265)
* fix typos ([52f2ef1](52f2ef1))
* generated GameObject will be named '[generated] *' ([9b2e5c1](9b2e5c1))
* inactive ParticleSystems are removed from the list on refresh ([4851a18](4851a18))
* mesh sharing not working ([8b4ca1a](8b4ca1a)), closes [#236](#236)
* nullptr exceptions when using nested UIParticle components in hierarchy ([e67e948](e67e948)), closes [#246](#246)
* nullReferenceException after copy-n-paste ([425aad0](425aad0)), closes [#258](#258)
* remove unnecessary per-frame allocation. ([e92b514](e92b514))
* scaling ParticleSystem puts prewarmed particles in wrong location ([fb31db4](fb31db4)), closes [#235](#235)
* sub-emitters option is not work in editor playing ([b308b26](b308b26)), closes [#231](#231)
* the camera under UIParticle will be assigned as _orthoCamera ([c42f8c8](c42f8c8))
* UIParticleAttractor attracts the particles at wrong position when in RelativeMode ([68d9925](68d9925)), closes [#262](#262)

### Features

* 'AbsoluteMode' option is renamed to 'PositionMode' ([67eff61](67eff61))
* 'AutoScaling' option will be imported from 'IgnoreCanvasScale' (for v3.x) ([4103041](4103041))
* add 'AutoScaling' option for UIParticle ([35325c8](35325c8))
* add 'UpdateMode' option for UIParticleAttractor ([903f702](903f702)), closes [#250](#250)
* add particle system getter and setter for attractor ([a4bcf93](a4bcf93)), closes [#253](#253)
* add public properties for UIParticleAttractor ([392ab6d](392ab6d)), closes [#253](#253)
* add Start/StopEmission API for UIParticle ([e499836](e499836)), closes [#240](#240)
@github-actions
Copy link

🎉 This issue has been resolved in version 4.2.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