Jump to content

Animating Cargo Doors


Recommended Posts

So basically i stared making a cargo bay. As i made the animations for the doors in Blender, when i imported the FBX into unity, there we're multiple animations. I've seen videos explaining how to animate a single door, but none really explain how to animate two or more! I got one door to work by just copying the animation name from the inspector window, but inspector doesn't allow multiple animation components. I also tried making the animations in unity, but that was even more complicated than blender. So i'm left with a question. Can you compile those animations in one and tigger it with a single module in the config or is there a different method?

Thanks in advance.

Link to comment
Share on other sites

7 minutes ago, Bottle Rocketeer 500 said:

@KerboNerd Don't turn on Automatic Keyframe Insertion for Objects and Bones (the red dot). In the beginning, insert a keyframe with all the doors closed. Then click where you want your next keyframe, partially rotate the doors, and insert the keframe. Repeat until you are done.

Wait, so your saying, i have to keyframe both of the doors at the same time? If so, what variable should i key?

EDIT I also never enable the option

Edited by KerboNerd
Link to comment
Share on other sites

Just now, Bottle Rocketeer 500 said:

Yes. LocRot should do it if that is what you mean.

Let me go through the details of my model. I have 1 base cylinder mesh, and 2 door meshes (They're separate). Just like the mk3 cargobay. 

Should i select both of the door meshes and add the keyframes to "LocRot"? And where do i find the LocRot? In the transform tab?

Link to comment
Share on other sites

2 minutes ago, Bottle Rocketeer 500 said:

@KerboNerd Rotate them separately. Then insert the keyframe. When you press Ctrl +I, you get a bunch of options. That's where LocRot is.

You see, when i rotate them separately, there are multiple animations in unity

Link to comment
Share on other sites

2 hours ago, KerboNerd said:

You see, when i rotate them separately, there are multiple animations in unity

You can use the animation tool, to combine multiple animations into one , (just firing up unity 1 sec) select both your animations , right click, select the animation option from the menu that pops up, then compile selected. this will result in the multiple becoming one ,  and result in a new file called CompiledAnimation,  rename this to whatever is best for your project ( doorsOpen sounds right)  then select debug option in the inspector and make sure your new animation is set to legacy, reassign it to the model, check and continue with setup export

BkVkEWL.png

Link to comment
Share on other sites

1 minute ago, SpannerMonkey(smce) said:

You can use the animation tool, to combine multiple animations into one , (just firing up unity 1 sec) select both your animations , right click, select the animation option from the menu that pops up, then compile selected. this will result in the multiple becoming one ,  and result in a new file called CompiledAnimation,  rename this to whatever is best for your project ( doorsOpen sounds right)  then select debug option in the inspector and make sure your new animation is set to legacy, reassign it to the model, check and continue with setup export

BkVkEWL.png

Now THAT'S what i like! Thanks a lot spanner monkey!!

Just now, KerboNerd said:

Now THAT'S what i like! Thanks a lot spanner monkey!!

By the way, to what i need to assign the animation component? To the part that's going to be animated orr...

Link to comment
Share on other sites

10 minutes ago, KerboNerd said:

Now THAT'S what i like!

Must admit that i don't import anything except really complicated animations these days,  I create simple animations once the model is imported using the legacy animation and the curve editor, no need to splice animations, and the option to endlessly tweak it should it not be right first time. 

Note dont use an animation controller or the Animator component for this, remove those if added,  use add component > miscellaneous > Animation for this , which looks like

As4J8h9.png

 

Edited by SpannerMonkey(smce)
Link to comment
Share on other sites

1 minute ago, SpannerMonkey(smce) said:

Must admit that i don't import anything except really complicated animations these days,  I create simple animations once the model is imported using the legacy animation and the curve editor, no need to splice animations, and the option to endlessly tweak it should it not be right first time. 

Note dont use an animation controller or the Animator component for this, remove those if added,  use add component > miscellaneous > Animation for this , which looks like

As4J8h9.png

 

hmm... ok! Off to testing!

Link to comment
Share on other sites

42 minutes ago, SpannerMonkey(smce) said:

Must admit that i don't import anything except really complicated animations these days,  I create simple animations once the model is imported using the legacy animation and the curve editor, no need to splice animations, and the option to endlessly tweak it should it not be right first time. 

Note dont use an animation controller or the Animator component for this, remove those if added,  use add component > miscellaneous > Animation for this , which looks like

As4J8h9.png

 

Where do i put the animation after i've made it and it's in my project window? On the part that will be animated or on the whole model?

Link to comment
Share on other sites

14 hours ago, KerboNerd said:

Where do i put the animation after i've made it and it's in my project window? On the part that will be animated or on the whole model? 

Depends on the part hierarchy (and the why of the hierarchy) but generally if you have imported the party with animation,  the animation would be on the model mesh (first child object) and this should have the animation component added from the inspector window.   If the animation is created in unity it can be either, in the example image above, it's all on the parent gameobject (containing the part tools exporter) as all the animations are created in unity, and that was the highlighted object when i opened the animation window.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...