Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    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,240
    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,240
    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.