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 MachCUBED · Aug 01, 2013 at 03:05 AM · animationmixamocurves.fbx.anim

Add curves to .anim files from Mixamo Animation Store?

Hi guys,

I've downloaded some animations from Mixamo's Animation Store for use in my game, and some of the animations are variants of jump animations where the character's collider size must be adjusted during the jump. There is a basic Jump animation that is part of a .fbx file that I got from an example (not from Mixamo) which features a curve (as per this YouTube tutorial) for adjusting the collider size during the jump. However, I can't figure out how to add curves to the jump animations that I bought from Mixamo (which are .anim files), nor can I figure out how to add those .anim files to a .fbx file in order to add curves in the FBX inspector window. Is there any way to add curves to .anim files, and/or to add .anim files purchased from the Mixamo store to .fbx files in order to add curves to them? Thanks in advance, this is important because if a jump animation is played without it having a curve for resizing the collider, the collider just shrinks to half its size during the jump with no other control.

MachCUBED

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by TonyLi · Aug 01, 2013 at 02:56 PM

Unity doesn't yet support Mecanim animation curves on .anim files. You can only add them to .fbx files. You can use something like the Event System for Mecanim to trigger events that will change the collider, though.

Comment
Add comment · Show 4 · 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 MachCUBED · Aug 02, 2013 at 11:19 PM 0
Share

I could do that, or I could simply add curves directly to my script and have the script modify the size of my collider over time. Here's my proposed code:

 /// <summary>
     /// Curves for collider and gravity management during jumps
     /// </summary>
     
     public AnimationCurve colliderHeight;
     
     public AnimationCurve gravityWeight;
     
     public AnimationCurve accelerationUp;

What I have below is my current code that manipulates the size of the collider based on animation curves. It needs to be modified to get its curve information from the above code.

 ...
 else if(currentBaseState.nameHash == jumpState) // if we are in the jumping state... 
             {
                 
                 if(!animator.IsInTransition(0)) //  ..and not still in transition..
                 {
                     // ..set the collider height to a float curve in the clip called ColliderHeight
                     //Old code for animation curves built into anims
                     col.height = animator.GetFloat("ColliderHeight");
                     
                     // Add a velocity boost when jumping
                     //Old code for animation curves built into anims
                     rigidbody.AddForce(Vector3.up * animator.GetFloat("AccelerationUp"));
                     
                     // reset the Jump bool so we can jump again, and so that the state does not loop 
                     animator.SetBool("Jump", false);
                 }
                 
                 // Raycast down from the center of the character.. 
                 Ray ray = new Ray(transform.position + Vector3.up, -Vector3.up);
                 RaycastHit hitInfo = new RaycastHit();
                 
                 if (Physics.Raycast(ray, out hitInfo))
                 {
                     // ..if distance to the ground is more than 0.25, use $$anonymous$$atch Target
                     if (hitInfo.distance > 0.25f)
                     {
                         
                         // $$anonymous$$atchTarget allows us to take over animation and smoothly transition our character towards a location - the hit point from the ray.
                         // Here we're telling the Root of the character to only be influenced on the Y axis ($$anonymous$$atchTargetWeight$$anonymous$$ask) and only occur between 0.35 and 1.35
                         // of the timeline of our animation clip
                         animator.$$anonymous$$atchTarget(hitInfo.point, Quaternion.identity, AvatarTarget.Root, new $$anonymous$$atchTargetWeight$$anonymous$$ask(new Vector3(0, 1, 0), 0), 0.35f, 1.35f);
                     }
                 }
             }
 ...

How should I derive my data from the script's own curve data?

avatar image TonyLi · Aug 03, 2013 at 12:09 AM 0
Share

AnimationCurve is a legacy animation curve for a legacy animation clip. It's different from a $$anonymous$$ecanim (Pro only) animation curve.

Can you get the FBX version from $$anonymous$$ixamo? At least for the animation(s) that need curves?

avatar image MachCUBED · Aug 03, 2013 at 12:45 AM 0
Share

Somehow, I just can't seem to figure out how to get FBX animations from the in-Unity store that I've downloaded.

avatar image TonyLi · Aug 03, 2013 at 02:15 AM 0
Share

Unfortunately, you can't. But if you paid for the animation from the in-Unity store (versus the Unlimited version of the store), $$anonymous$$ixamo may credit you to get the same animation from their website in FBX format. Just send them an email. They have really good customer support.

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

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I convert .anim files to .fbx files? 1 Answer

Curves in .anim files? 2 Answers

Animation files 1 Answer

Everything works in Maximo but exporting it to Unity will give me problems.. 0 Answers

Modify Mixamo humanoid animation 2 Answers


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