Search Unity

Make collision objects phase through each other and keep collision detection.

Discussion in 'Physics' started by kennethrunescape2019, Dec 28, 2019.

  1. kennethrunescape2019

    kennethrunescape2019

    Joined:
    Feb 5, 2019
    Posts:
    109
    Is there a way to make colliders not physically touch each other but phase through each other yet still detect they overlap each other without using ontrigger events or using trigger colliders?
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,497
    You've just described exactly what Colliders set to triggers are for yet you don't want to use them. Could you explain why you don't want to use them?
     
    doarp likes this.
  3. kennethrunescape2019

    kennethrunescape2019

    Joined:
    Feb 5, 2019
    Posts:
    109
    I can't use trigger colliders because I am using a non convex mesh collider, which do not work with triggers.
     
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,497
    Sounds like you'll have to use 3D physics queries to test for overlap then i.e. OverlapBox, OverlapSphere or OverlapCapsule.
     
  5. doarp

    doarp

    Joined:
    Sep 24, 2019
    Posts:
    147
    Or use a convex collider for a non-convex rendered mesh. Or a composite of convex colliders.
     
    MelvMay likes this.