Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Detecting multiple trigger colliders in city builder game

Discussion in 'Physics' started by Dave2407, Aug 26, 2019.

  1. Dave2407

    Dave2407

    Joined:
    Mar 13, 2017
    Posts:
    6
    I just started working on my own little pirate themed city builder project, ive got a pretty decent system on placing the buildings but the collision is strange. I have got a collider with the tag "PlaceArea" on the ground, where eveyrthing may be placed. And a different tag on already existing buildings.

    The collider on the preview building is always a trigger btw.

    the preview of placing the buildings is supposed to be red when colliding with buildings like here: Screenshot_1.png

    and its supposed to be green when not colliding with any buildings, but 50% of the time is doesnt detect the other buildings collision, like here: Screenshot_9.png

    How would i go about making this work 100% of the time? Any help would be greatly appreciated.

    Thanks!
     

    Attached Files: