Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Red errors when using particles collision

Discussion in 'Scripting' started by OnTopStudios, Aug 23, 2021.

  1. OnTopStudios

    OnTopStudios

    Joined:
    Aug 19, 2013
    Posts:
    44
    Hello,

    We're making a project that uses particle collision to detect and trigger something on our enemies.
    However we're having these errors everytime the enemies touch the particles:

    upload_2021-8-23_10-42-54.png

    We've gotten this error "fixed" when we disabled "Velocity over lifetime", however if we do that, the particles fall below the floor (they're supposed to be static).

    We've searched for this error and it seems it's fixed and then comes back, depending on the Unity version people are using. Currently we're using Unity 2020.3.16f1.

    Any help would be greatly appreciated!
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,281
    Hey! This error can pop up any time a particle gets an invalid position. So there can be lots of causes.

    we aren’t aware of any current bugs that could cause this, so a bug report would be handy if you can supply one?

    also, it’s worth checking that you aren’t sending invalid data from script via SetParticles or similar.

    a common example is dividing a floating point number by zero in script.
     
  3. OnTopStudios

    OnTopStudios

    Joined:
    Aug 19, 2013
    Posts:
    44
    Hi, thank you for your reply!

    We'll submit a bug report however we can, but wen't can't give any details about the project itself. We'll try to replicate on an empty project and submit from there!

    We're not doing any operations on scripts with the particles, we're simply setting Velocity Over Lifetime to 0.

    This error only occurs at the time of collision. If we disable the collision checkbox on the particle system, there are no errors popping.
     
    richardkettlewell likes this.
  4. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,281
    Sounds like we are doing a divide by zero, inside Unity!
     
  5. OnTopStudios

    OnTopStudios

    Joined:
    Aug 19, 2013
    Posts:
    44
    So, a little update about this issue.
    We found a workaround for now, but it's not pretty.

    upload_2021-8-23_17-47-0.png

    I guess the speed modifier being at 0 was the culprit here. We just set it to a really low value and visually it does the same thing, except there are no AABB errors. Hope this helps!
     
    richardkettlewell likes this.