Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Rotation and handedness problems still not solved...

Discussion in 'Scripting' started by vagos21, Sep 3, 2012.

  1. vagos21

    vagos21

    Joined:
    Sep 3, 2012
    Posts:
    18
    Hello,

    I'm sorry for posting about this subject for like the 10th time, i've searched a lot about it, on unity forums and answers, and still didn't get to solve my problem...! I'm in deep despair now!

    I've been using unity for about 2 years now and everything's been going great, until one day i thought i'd make my own fast-assembler software for any construction toys like Lego. So i used 3ds max to model my "bricks" and used my own instancing system since max's reference system is still not fixed for years now. So i keep all the parts in one file, and every time i make an assembly, i just save a text file with one line for each part like this:

    partName,position.x,position.y,position.z,rotation.x,rotation.y,rotation.z,rotation.w

    You can easily guess where this is going....

    I exported all these parts as obj files (ticked on the invert XY in export settings), pulled them into unity, successfully load them in a nice library and i instance them for the same job i do in max...

    This is where the problems started, with rotations mostly. i've been trying literally hundreds of combinations changing orders in the quaternions but i can never, ever, for 2 weeks now, get the rotations right...!! I'm so desparately stuck in this one, if anyone has the same problem or a solution please please help...

    i've also tried exporting to fbx with the same no luck,

    for the position i see that this works well:
    unityPos.x = maxPos.y
    unityPos.y = maxPos.z
    unityPos.z = -maxPos.x

    for rotation i really can't make it work. I've tried everything suggested in this thread but no luck.

    If you want to see part of my code, i'd happily share it... but everything works brilliantly (mesh importing, collision meshes, part connector points) except for the rotations

    thank you in advance!
     
  2. vagos21

    vagos21

    Joined:
    Sep 3, 2012
    Posts:
    18
    If this helps anyone, this is how the assembly looks in 3ds max:
    $inMax.jpg

    and this is how it looks in unity:
    $inUnity.jpg

    this time i exported the parts as obj but without the "flip YZ" option. I also imported the positions and rotations as they come out of max, in xyz and quaternions
    Any ideas someone...? :confused: