Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Jodwig · Dec 28, 2016 at 09:30 PM · unity 5bugparticle systememissionrate

Unity 5.5.0 Particle System - Emission Module - Rate over Distance bug

After upgrading my project from Unity 5.4.x to Unity 5.5.0 most of my particle systems stopped working. I checked it, and found out that all Particle Systems that used Rate over Distance in Emission Module stopped working. In editor when I move the Particle System manually on the scene it works just fine, but not when I play. So then I started checking everything carefully and found out the culprit. I used "transform.position" to move my projectiles etc. and this function no longer affects Rate over Distance. When I changed the script to Rigidbody and AddForce function it suddenly started working.

No idea if this is intended by them or simply a bug, but I didn't find anything online regarding this change in 5.5.0. It always worked, and I don't feel like changing all my code and fighting with AddForce to achieve similar values as in transform.position.

Does anyone else noticed this? I submitted it as a bug, but it might take weeks for them to answer it.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image dempzey · Mar 19, 2017 at 07:09 PM 0
Share

I have the same problem in my case I'm moving object with Rigidbody $$anonymous$$ovePosition, and turning it with Rigidbody $$anonymous$$oveRotation. $$anonymous$$y object has particle system with rate over distance emmision (simulation space: world). And only strangly only $$anonymous$$oveRotation couses particles emmision and $$anonymous$$ovePosition doesn't, so they are appearing only when turning. Using Unity 5.50f3

5 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Jodwig · Dec 31, 2016 at 03:24 PM

So, it's a problem with Rigidbody. When your object has non-Kinematic Rigidbody attached to it, it will screw your Rate over Distance if you are trying to move it with transform.position. It's not a bug, but a Unity change in 5.5.0: https://issuetracker.unity3d.com/issues/particles-emission-over-distance-not-working-when-moving-parent-with-not-non-kinematic-rigidbody-slash-rigidbody2d

And as I said, I contacted Unity Support and that's what they said:

"When a RigiBody is attached to a ParticleSystem we now use the velocity from the Rigidbody instead of calculating it.

The reason for this is that the Rigidbody and the particle system would have different velocity values which would cause particle to behave incorrectly, particularly at large velocities.

We now allow the Rigibody to control the velocity when attached (and kinematic). By dragging a particle system in the scene the Rigidbody will not update its velocity, however child systems calculate a local velocity using positional difference and then apply this to the Rigibody velocity which is why it still works with children providing they do not have a Rigibody attached.

If you wish to drag the object in the scene then you would need to either remove the Rigidbody or write a script to update the Rigibody velocity value to match the dragging action.

There is a small icon to indicate that a Rigidbody is being used in the Inherit Velocity module, we will move this to the main module so it is more obvious."

Hope it helps someone.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by CLaferriere · Jan 09, 2017 at 11:37 AM

I'm having a problem where my character has a particle effect behind them, and moves with velocity. However the character can dash forward where I use addforce to push them. The particle effect with rateOverDistance works fine for movement, but as soon as you dash with the player and addforce takes over, the particles don't emit. It works only when the player is holding down the movement joystick while dashing which leads me to believe it rateOverDistance needs just a velocity and not addForce.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Meganion · Apr 18, 2017 at 04:13 PM

Hey,i've made an workaround at: https://forum.unity3d.com/threads/particle-system-distance-rate-rigidbody-2d.445785/

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Meganion · Apr 18, 2017 at 06:01 PM 0
Share

Basically you do have to add another gameobject with rigidbody knematic not simulated and put the particle system inside that, it will work perfectly

avatar image CLaferriere · Apr 18, 2017 at 06:05 PM 0
Share

I actually figured it out a while ago, but you had a different solution then I did, I'll post my solution later if you're interested.

avatar image Meganion CLaferriere · Apr 19, 2017 at 02:13 AM 0
Share

Sure, it would be quite good! :D

avatar image
0

Answer by Meganion · Apr 19, 2017 at 06:25 PM

Hey @Jodwig, i've found the answer for this problem, i've posted the solution on the link below https://forum.unity3d.com/threads/particle-system-distance-rate-rigidbody-2d.445785/

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by sirleto · Aug 27, 2021 at 08:48 PM

i have had this same problem in 2021 (using unity 2019) and i read this thread and the one linked by user meganion.

i found the described behavior logical but the solution(s) confusing.

what i did was this:

  1. as a "bullet" i am having a particle effect with "emission: rate over distance" with non-kinematic rigidbody (parent). it worked well even though it has the above described situation.

  2. i added a "homing" effect, by putting a Rigidbody.AddForce() in (Fixed)Update() which required me to set Rigidbody.Velocity() to zero or else my homing wouldnt work.

  3. with this change the particle effect was lost (not emitting anything)

  4. what i needed to do to solve it was now this:

rb.velocity = this.transform.forward my_custom_speed Time.fixedDeltaTime;

so as a summary: having the rigidbody was no problem. starting it with AddForce() was no problem. but adding homing effect with AddForce() in each FixedUpdate() AND setting velocity manually to zero (which is maybe stupid, i dont know, it just worked for me) caused the velocity to stay zero. setting the velocity manually worked, but only when i multiplied it by Time.fixedDeltaTime (because its a physics effect).

hope this helps someone else :-)

feel free to tell me where my whole logic is stupid, i would love to learn to do it better :-)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Shuriken particle are clipped by Skinned Mesh Renderers? 0 Answers

[Newbie] Particle System does not work right. 1 Answer

Anyone on Unity 5 beta 12 getting this crash? 0 Answers

MovieTexture black on Mac build 1 Answer

Ui extension bug 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges