Search Unity

unity5 trigger on non-convex collision

Discussion in 'Physics' started by ScottJ88, May 21, 2017.

  1. ScottJ88

    ScottJ88

    Joined:
    Aug 28, 2012
    Posts:
    47
    I have been working on a project for many years now - I have recently upgraded from unity 3.5 to unity 5.6.

    As such in unity 5 the collision on non-convex mesh collisions no longer work.

    in my previous build in unity 3.5 I had areas defined as a trigger by mesh colliders due to needing lots of them with all being irregular shapes - they where 2d in nature but I believe unity treated them as 3d still

    this was broken down (as you may see from some splits in the picture) into grids so to help with optimization, I had decent performance and no issues however when coming into unity 5 they no longer work - saying that triggers no longer work on non-convex collision.

    What I need is for when another collision object - say a simple box collider, enters one of these areas to trigger an event. I considered doing something outside of the collision system altogether and use a texture and some shader code getting the moving objects position and updating the shader with an x&y relative to this position - when the 2 overlap to "somehow" send an event (do a test to send event) as it was all 2d but I have little experience with that kind of stuff and wouldn't know exactly where to start

    with the recent bit of research I done I have looked a bit into 2d physics but still cant find exactly what I would need to get this system back up and running

    If anyone has any suggestions on this and can point me to a relevant post / tutorial / documentation page I would be grateful!