Struggling to get setup in unity after export.

Hello.

So I followed the course all the way through really enjoyed it and learned lots.

However, when It came to playing the animations in Unity nothing was quite right. (I tried too many parent/origins combinations to list)

I'm aware this issue was discussed in previous questions. I have followed those instructions and responses to no success. 

I just wondered if it would be possible to get a video of how to correctly parent/setup the rig and rifle inside of a unity project.

If you need any files from me I'll be more than happy to get them over to you.

Thanks in advance :D

  • jlampel sorry to bug

  • crew

    Hey, sure thing! Could you explain a bit more what you mean by no success? Are all the actions baked? What happens when you parent the gun to the character's root in Unity like in the other thread? 

  • Hello, Jonathan thanks for the response.


    I have baked the weapon's reload animation and the character rig's two animations. They are the only ones I'm testing with.


    My first setup had the weapon and the character attached to the same parent. When I did this only the reload animation worked perfectly.  The equipt animation didn't work properly, unfortunately.

    Attaching the weapon to the characters armature's root also had the same result.

    https://youtu.be/lkYwV2lnPj8


    Another attempt I tried was attaching the weapon to the characters hand. Every animation seemed to work properly except the reload animation.  https://youtu.be/QgRGwoHK4OM


    Attached below are the files I'm using.

    Animation.blend = Is where I'm animating the rigs together.

    Cromwell.blend = The gun

    FPS arms.blend = The character rig .

    pistol_export.fbx = The exported pistol with animations attached.

    FPS arms.fbx  = The exported character rig with animations attached.

    https://drive.google.com/drive/folders/1t5kTJjm3_KscnnMxyZFgzmzaqfkooWbB?usp=sharing


    If you need anything else or if you need any of my mess explaining let me know and I'll get them amended to help you help me  :D

    Sorry in advance. I really appreciate the help. 

    - Another Jonathan


  • crew

    Ok, two thoughts based on a quick look. In the file itself I'm only seeing the baked reload animation and no baked equip animation. Is that correct or are all your actions baked in your file? 

    Can you also confirm that in your first video, the equip animation is set as the motion in the starting state of both the gun and the arms animation controller? It looks like it could just be gun controller not having anything assigned to the state, but I could be wrong. 

  • I think this is where I'm going wrong then. When I bake the pistols other animations it would seam the root bone has no motion.

    So from this, I'm thinking I'm baking the animation wrong. or the piston is not parented correctly.


    You are correct only the arms had the equipt animation attached in the videos is sent. I mainly did that because there was no root motion on the arms equipt animation. I'm going to have a stab a re-baking everything and try to get that weapons root bone moving.

  • I am happy to report that after redoing all the animations and rebaking them. All the animations seem to work. :D

  • crew

    Awesome, glad that did the trick!!