Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Selective Collisions?

Discussion in 'Physics' started by IchBinJager, Jan 15, 2015.

  1. IchBinJager

    IchBinJager

    Joined:
    Dec 23, 2014
    Posts:
    127
    Hey, I've a question; Is it possible I could enable colliders to selectively collide only under certain circumstances? Like, for example; I have a grenade which is thrown that produces a volume of smoke; I need the smoke to block AI vision therefore I need it return that it was struck in a raycast. However, say I have a projectile as a RigidBody but I need it to pass through smoke, as smoke clearly isn't solid to a bullet.

    Is there a way I could do this?
     
  2. IchBinJager

    IchBinJager

    Joined:
    Dec 23, 2014
    Posts:
    127
    Does a trigger still get registered from a Raycast?
     
  3. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,615
    you can setup collision layers in project settings -> physics.
     
    Cpt Chuckles likes this.
unityunity