Search Unity

Importing a Blender model / use as Ragdoll

Discussion in 'Asset Importing & Exporting' started by WeAre0ne, Oct 5, 2018.

  1. WeAre0ne

    WeAre0ne

    Joined:
    Oct 5, 2018
    Posts:
    2
    [Problem Solved; Attachment Removed] Hello fellow developers,

    i'm having trouble using a model of mine as a ragdoll.
    Here are the steps i did:

    1. Used Blender to export my model as an fbx.
    2. Imported the fbx into unity.
    3. Moved it into my testlevel (only one plane as ground, and the model above it)
    4. Used the ragdoll-wizard to make it a ragdoll. I've named all bones the same as the ragdollwizard to avoid confusing things.
    5. I started it. It fell down, and then moved really really weird.
    6. I've tested dropping it from several positions, and the result was always the same. :/

    I've attached my blender model to this posting, and really hope someone more experienced than me would take a look into it and tell me what i did wrong with it.
    Since i've named my bones the same as the wizard does, it's maybe enough to open it in blender, and see if the problem can already be found by looking at it.

    Or ... maybe we do still have this blender import issues from years ago, where all the bones are rotated into strange directions, which would make any using as a ragdoll impossible? please tell me this isn't the case after so much time! And if this is the case: is there an easy (and free) workaround?

    Thanks in advance for your help! :)
     
    Last edited: Oct 6, 2018
  2. WeAre0ne

    WeAre0ne

    Joined:
    Oct 5, 2018
    Posts:
    2
    Problem solved. Just in case anybody else stumbles across the same problem, i don't want him to find an unanswered post, so here is what caused the problems:

    1. My model had bones which were not part of the ragdoll. I removed them. Even the rootbone. So only bones which are part of the ragdoll have been left.
    2. You see the generated colliders after generation when you select your Amature in Unity. My head was for some reason generated as a sphere-collider with wrong size. I removed said collider from the headbone object (in unity) and replaced it with a capsule collider, which i manually adjusted to cover the head of my object.
    I couldn't see it at first, because the sphere which the wizard generated was extremly tiny.

    And the most important thing: The fbx-exporter in Blender finally works as intended. Just leave it at the default forward=-Z Forward and Up = Y Up. i tested that with a script which continually looks at an object, and attached the script directly to the amature OR to the created root gameobject, and in both cases, it looked directly at its target without any modifications. Or maybe unity fixed its importer and not blender its exporter, who knows? At least it works as intended now :)