No announcement yet.

Newbie Question: Aligning Stuff In Maya So That Rotation Will Match In UDK Socket

  • Filter
  • Time
  • Show
Clear All
new posts

    Newbie Question: Aligning Stuff In Maya So That Rotation Will Match In UDK Socket

    This is probably something extremely simple, yet it has been driving me insane. It's so **** frustrating!!!

    I've modelled and skinned a weapon (file A.mb) and a character (file b.mb).

    I want to animate them in Maya and in order to do so I'd like to parent the weapon to the character in Maya in such a fashion that I won't need to edit the UDK weapon socket's rotation and translation (as it is extremely inaccurate - one frame looks ok, the next one you notice the gun's barrel is not in the exact spot you wanted it).

    I've tried displaying the weapon's root joint local rotation axis, as well as the right hand's joint's (where the weapon socket is created from in UDK) and rotating the weapon joint's local rotation axis so that it'll match the right hand joint's local rotation axis... yet when I import this adjusted weapon skeletal mesh in UDK and use it as preview for the character's weapon socket, it is not even facing the same direction it did in Maya!

    Please, which tricks do you guys use to accomplish this?

    You can use probably 2 ways to deal with alignment for a gun. I'll describe the way I think you did it with what I think you missed for it not to work out.

    The root of the gun need to be aligned to the bone on the hand you use for placing the gun 100% inside of Maya. Then you orient the gun into place to fit the hand without touching the root of course. So that makes it fit in the hand but for it to work in the UDK before export, you need to put the gun back on 0,0,0 and orient the root back to 0,0,0. This means the gun will have a strange angle at export. The point being that the root of the gun needs to be zero'd before export, but the gun should stay in it's oriented position. My guess is, this is the step you missed and it throws out your alignment.

    I will also describe the other way to do this.

    You place your gun in the hand using the root bone, also align it using the root bone. So the root at this point is not actually oriented to any existing bone on the hand, you just use it directly for placement and alignment to the hand. Now duplicate the root of the gun and rename it to something like b_weapon or whatever. The duplicate will match the root perfectly so no adjustments are needed. Now parent that new gun target bone to the hand, normally the wrist.

    So now you have a bone on the hand that matches the root of the gun perfect. Now you can zero out the root of the gun again and this time it will just be normal, no weird angle on the gun. The gun target bone will compensate the orientation in stead of the gun itself doing that, like in the previous explanation. So after you zero out the gun, you can export it.

    Any new guns you make, as long as you match the current gun with the contact points, that same target bone will work and if you add a socket to it, it will match orientation of that bone and gun will fit properly.

    Hope all this make sense.


      Ok! Thanks for your help, now I've solved my problem! Thank you!