Search Unity

Turning off compound colliders?

Discussion in 'Scripting' started by vagos21, Mar 4, 2013.

  1. vagos21

    vagos21

    Joined:
    Sep 3, 2012
    Posts:
    18
    Hello,

    I plan on using gameobjects which have about 10 children gameobjects. But i want to operate on mouse detection separately for all these colliders, problem is they now act as one due to the compound collider feature... is there a way i can turn this thing off?

    The reason i want to use them separately is clearly a performance reason, i'll be having hundreds of these children, and i think keeping them as children so they follow their parents around would be faster than keeping them separated and applying transformation for all of them according to their parent's transformations on every frame... wouldn't that be a killer for about 700 objects?

    Does anyone have any idea if i can turn compound colliders off, or a workaround?
    Thank you
     
  2. hpjohn

    hpjohn

    Joined:
    Aug 14, 2012
    Posts:
    2,190
  3. vagos21

    vagos21

    Joined:
    Sep 3, 2012
    Posts:
    18
    i would like to avoid using raycasting, since i want to do some real-time mouse-over-change-material thingy on all of my "parents" and "children" and it's very complex i've already tried it and ended up in missing some material changes due to fast mouse movement... :)

    so i'll either go back to raycasting or handle children manually?