Home Technical Talk

Maya Exporting object pivot location/orientation into Unity

polycounter lvl 5
Offline / Send Message
MrPie polycounter lvl 5
Hi guys, i'm a bit stuck on this situation. We have a rope with some bones attached to it that will be animated in Unity however i can't see to export the orientation of the pivot into unity. I tried testing it with a simple cube. I moved the pivot to a vertice on one of the corners and exported it as FBX into unity but the gimbal shows as being right in the middle of the cube. So far, i've done 'Select by component type'> selected 'local rotation axes' on the question mark and rotated the orientation of each bone to where i want it. Deleted all non deformer history and history. Exported as OBJ (not sure if they export orientation) and none of them have worked. Any help would be greatly appretiated! 

Replies

  • Mark Dygert
    Options
    Offline / Send Message
    So there is a pretty big difference between a skinned and non-skinned mesh. So your test cube will need to be skinned to a joint in order for your testing to function.

    If it's a non skinned object, it will use the scene pivot as the objects pivot. Usually you have to move the object to the scene origin, export and then move it back. There are quite a few scripts that handle this for you, it's also not tough to write and good practice.

    If it is a skinned object, it will use the root joint as the main pivot, moving it around the scene shouldn't really affect what gets output, but to some game engines it does and you end up moving it's pivot to the scene origin and then exporting, like you would a standard unskilled mesh.
  • MrPie
    Options
    Offline / Send Message
    MrPie polycounter lvl 5
    Thanks mark using your advice on the non skinned object worked and the object imported with the pivot at the corner vert. However i can't seem to get the same success with my skinned object.

    so this is the orientation of the pivots i would like my joints to have;



    but in unity i get this;


  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    do you have your unity move tool set to local or global pivots? 
  • MrPie
    Options
    Offline / Send Message
    MrPie polycounter lvl 5
    do you have your unity move tool set to local or global pivots? 
    Hi, sorry for the late reply. It's set to local.
Sign In or Register to comment.