Search Unity

Unity - Maya Animation and collision

Discussion in 'Animation' started by JesseMulder, Sep 23, 2014.

  1. JesseMulder

    JesseMulder

    Joined:
    Sep 23, 2014
    Posts:
    1
    Hello,

    I've made a gate in Maya and made there an animaiton. I imported it in Unity and set up the animation.
    When I walk towards the gate and press "e" the door opens. That works.
    But when the gate opens you can't walk through because of the cubecollision i've set up.
    But when I remove the cubecollision the animation doesn't work.

    So is there a way I can open the door in Unity with an Animaition from Maya and that the cubecollision rotates with the gatedoor?
     
  2. RepublicCommando

    RepublicCommando

    Joined:
    Jan 8, 2014
    Posts:
    5
    I don't have any experience with Maya (I work in XSI7.5).
    It sounds like your animation includes cube collision as some sort of hierarchy necessary to play correctly.
    I wouldn't worry about the collision at first, just get the animation to play, and then attach a cube collision component to the moving part of your door in Unity.

    I seem to have not gotten that to work yesterday, I think the transform position of the moving door stays the same if you are using bones to manipulate the doors visual position (so if you attach a collision component to something that isn't moving, what happens?... Exactly! Nothing.)

    The way I got mine to work was set up my door where the bone is a child of the moving part (door is "enveloped" to the bone it is parent to), then in Unity I attached my collision component to the bone since it is technically the only thing moving in the hierarchy.