• 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 Phelan-Simpson · Aug 24, 2018 at 01:35 AM · animationriggingrig

Can a Bone's Rotation along a specific Axis drive an animaton

Hello,

As a rigger, I was just wondering if I can script an interaction in Unity to make a bones rotation run back and forth through an additive animation on that same rig?

i.e. Bone y can rotates 90 deg on its local x axis, which in turn drives a 9 frame animation to play forwards and backwards depending on the bones current rotation.

i.e. Bone y rotates 10 deg and animation x interpolates smoothly between frame 1 and stops on 2.

Thanks,

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
1

Answer by eses · Aug 24, 2018 at 11:18 AM

@Phelan-Simpson


Edit: I'm not quite sure what you meant by "an additive animation on that same rig". So sorry if this is too basic / wrong answer.

Hi, yes you can, although I'm not sure about the cost, how taxing it is or not.

You can at least use legacy Animation (not Animator) component, and set it's animation clip frame. See: https://docs.unity3d.com/ScriptReference/Animation.Sample.html

With this knowledge, you could create a script that takes some rotation, normalizes it between values 0-1 and then use that value to drive animation clip, i.e. you sample the animation clip with values between 0-1 (or any range), instead of playing the clip.

So the answer is, you can create systems like Maya Set Driven key or 3ds Max Script Controller animation controller.

Take a look at examples - Some rigger even created full blown auto-rigger in Unity: https://assetstore.unity.com/packages/tools/animation/puppet3d-111554

And then there are other neat assets like FinalIK and Puppet Master, which show that you can go far beyond driven keys.

Example:

alt text


20180824-driven-animation.gif (256.9 kB)
Comment
Add comment · Show 2 · 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 Phelan-Simpson · Aug 24, 2018 at 06:55 PM 0
Share

That's cool, thanks for checking if it worked, that's using the legacy animation system right? I am thinking maybe with animation layers I could get this working with $$anonymous$$ecanim. A separate layer that is purely the driven animations. Time for experimentation.

avatar image eses Phelan-Simpson · Aug 25, 2018 at 07:17 AM 0
Share

@Phelan-Simpson - yep it's using animation component.

avatar image
0

Answer by Phelan-Simpson · Aug 24, 2018 at 06:10 PM

Thanks for the reply, I have seen those assets before, Final IK seems awesome, but just not needed for what I want to create. I too was wondering about the cost of an operation like this, especially If I am using it at a number of different joints.

Its already works great with baked animation, except I need it for dynamic aiming and foot placement, so it has to been driven off of rotations, otherwise, say hello to terrible deformations.

"EDIT" Does a mod want to make this a reply to the other guys answer, whoops.

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 eses · Aug 24, 2018 at 06:19 PM 0
Share

...I think you can just add comment yourself and also delete your own answer - I think?

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

234 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 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 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 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 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 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 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 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 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 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 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 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Animation Rigging/Rig Builder Problem 0 Answers

Squash and stretch support? 2 Answers

How to rig a model so that it can perform 2 different animation at the same time with different body part? 2 Answers

Anima2D - Deform and stretched sprite mesh when rotating with bone 3 Answers

How to retarget animation to another (faulty?) character model 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges