Search Unity

  1. 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

Ok, what's up with Animator Controllers and bone colliders?

Discussion in 'Editor & General Support' started by LeftyTwoGuns, Sep 20, 2014.

  1. LeftyTwoGuns

    LeftyTwoGuns

    Joined:
    Jan 3, 2013
    Posts:
    144
    I have an NPC set up with bone colliders using Unity's ragdoll wizard. I was wondering why I could accurately hit all of the colliders with a Physics.Raycast except for its arms. And why I could accurately hit the arms of an NPC set up identically but using an Animation component instead.

    More messing around and it seemed like no matter what animation I used for an NPC with an Animation component, all hits were accurate. But results varied with the NPC using an Animator Controller. If I put it in a crouch idle, for example, the raycast didn't hit ANY colliders, except for the torso, when not even aiming at the torso.

    So, what am I missing here with Animator Controller vs. Animation when it comes to parented colliders? Or is this just all in my head and I'm going crazy?
     
  2. LeftyTwoGuns

    LeftyTwoGuns

    Joined:
    Jan 3, 2013
    Posts:
    144
    Well, now I'm fairly convinced this has something to do with Animator Controllers. Because I just removed the Animator Controller completely and the raycast hits accurately on all the bone colliders. Same with a character using an Animation component.

    Does anyone have anything to share in regards to how Animator Controllers work with colliders in this situation?
     
  3. LeftyTwoGuns

    LeftyTwoGuns

    Joined:
    Jan 3, 2013
    Posts:
    144
    Last edited: Sep 21, 2014
  4. LeftyTwoGuns

    LeftyTwoGuns

    Joined:
    Jan 3, 2013
    Posts:
    144
    Well, the closest I've gotten was setting all the colliders's rigidbodies to interpolate, which gives 100% accuracy but obviously the animations and bones go haywire.

    I figured this would be something more widely discussed. I didn't think putting colliders on a Mecanim character would be such an abstract concept
     
unityunity