Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Particle new Trigger, am I missing something?

Discussion in '5.4 Beta' started by imtrobin, Jun 16, 2016.

  1. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    So, I'm looking at the new Triggers API, it seems I have to specify which colliders that will receive the callback. Shouldn't it be tied to the physics system closely like the others callbacks?

    Example, I set it an object on different physics layer that are ignored, the OnParticleCallback still gets called anyway.
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Hi,

    We decided to provide an explicit list of trigger volumes, for a couple of reasons:
    - it's fast to just check a small number of colliders
    - physics layers are a scarce resource, it can be easy to run out of layers and we didn't want to compound this problem with another system making use of them

    That said, being able to apply the physics layers sounds like a useful feature. Would you envisage it being a simple checkbox in the module to enable filtering based on the active layers?

    Right now, I think your only workaround would be to add/remove colliders via script.
     
  3. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    I glad you mentioned physics layer being a scare resource. It is. I have mentioned this before, why is rendering layers tied to physics layers? Deferred rendering can only ignore 4 layers, so I get the this warning all the time or forced to switch to forward rendering. In my own engine in the past, I separated rendering and physics layers.

    In this case here, I would expect to be implementing something generic. Say for rain, I would set a physics layer that the rain particle would collide with, and let the artists set that up instead of individual colliders.