Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Kyle 6 · Oct 11, 2010 at 02:47 PM · animationblenderarmature

Playing two animations from one armature

I have a simple armature with two animations. It is simply two cylinders that each have an animation to wave around. I can play each animation separately (alone) but not together.

This is the code I have attached to the armature:

function Start() { animation["LeftArm"].wrapMode = WrapMode.Loop; animation["RightArm"].wrapMode = WrapMode.Loop; }

function Update () { animation.CrossFade("LeftArm"); animation.CrossFade("RightArm");

}

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Loius · Oct 11, 2010 at 03:23 PM

This is because your animations overwrite each other. The leftarm animation has curves for the right arm and vice versa.

The best way to fix it is to go back to your modeling program and remove the animation information for arms that aren't in the animation.

If you're using Blender there's a complication, in that the default FBX exporter doesn't work correctly for this situation.

What you need to do is open your export_fbx.py file (forget where it's located), find the line

if ob_generic == ob_meshes and my_ob.fbxArm:
  # do nothing,
  pass
elif ob_generic == ob_bones:

and alter the last line to be:

elif ob_generic == ob_bones and my_ob.blenName in blenAction.getChannelNames():

Now FBX animations will only export bones that do have animation keys in the animation.

You can fix it in code through setting the clips' blendMode to AnimationBlendMode.Additive, which will "add" their movement to the currently playing animation. You'll need to have another clip that isn't additive playing or they won't work, I think.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Mike 15 · Oct 11, 2010 at 11:36 PM

Hi, I am the one that made the cylinders and animations for him. I did it in Blender 2.49b What I did was make two parallel cylinders, both in the same mesh. I made a small armature for them, where I made one first and duplicated it across in edit mode, meaning they are both in the same armature. I made one action for the left cylinder to move, one action for the right cylinder to move. Both actions only effect the base bone of their respective armatures, meaning they are completely independent of each other. I have a third action called Base where it just one frame of the cylinders in their default standing position. I can use the NLA Editor in Blender to play both actions at the same time and it works great. We are using this as an experiment so we can get the hands in a first person shooter working. I can't see any reason why what I made is causing the problem. It looks like Vincenti might be on to something. Thanks in advance for any further help.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Loius · Oct 13, 2010 at 03:37 PM 0
Share

I edited my answer above to add a solution for Blender. If that doesn't work for you, leave a commend and I'll see if I can post the entire .py up somewhere.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Problem with ragdolls and my armatures 3 Answers

Blender animation problem with armature 1 Answer

My animation will not play after I apply armature in Blender. 1 Answer

Animations from blender going super weird 1 Answer

Animations from Blender jerky/skipping frames 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges