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 coffiarts · Feb 26, 2013 at 09:37 PM · animatorblenderavatar

Can Animator.MatchTarget and AvatarTarget be used for generic rigs?

Hi,

I want to "MatchTarget" an animation to a target point using Animator.MatchTarget and AvatarTarget, like this (according to the mecanim animation tutorial):

 var anim:Animator = GetComponent(Animator);
 [...]
 anim.MatchTarget(hitInfo.point, Quaternion.identity, AvatarTarget.Root, new MatchTargetWeightMask(new Vector3(0,1,0), 0), 0.6, 0.76);

I am doing this for a model that was imported as "generic rig", i.e. the Avatar is only a generic one, with no specific bone assignments inside Unity.

MatchTarget doesn't seem to be doing anything: My animation just runs to its end, no matter where the object is located in relation to the target point.

Is this a natural limitation for generic rigs? Or am I doing someting wrong?

I've already checked the following:

  • hintInfo.point seems to be valid and the expected position (according to the debugger)

  • start and end points (0.6 and 0.76) are also valid (I tried to change them to arbitrary other values between 0 and 1, which makes no difference at all)

Any helpful ideas highly appreciated!

Comment
Add comment · Show 3
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 coffiarts · Mar 01, 2013 at 07:02 AM 0
Share

Update: $$anonymous$$eanwhile I've tried defining my rig as "humanoid" (which is possible, basically, except for some $$anonymous$$or movement flaws). But the result is still the same: $$anonymous$$atchTarget doesn't seem to be doing anything!

However, I am asking myself now whether I've correctly understood the role of $$anonymous$$atchTarget: I want a jumping animation to lengthen/stretch/slow down towards its end during longer falls, so that its final "landing" part is exactly timed with the moment of "touch down". But is this really what $$anonymous$$atchTarget is meant for? Or should it simply sync object rotation?

avatar image EHogger · Mar 01, 2013 at 09:34 AM 1
Share

When you use $$anonymous$$atchTarget the animation speed doesn't change, but the position and rotation of the AvatarTarget should adjust to meet your target. It essentially adjusts the physics for you. Have you got the "animate physics" option turned on for your animator component?

avatar image coffiarts · Mar 02, 2013 at 08:47 AM 0
Share

Thanks, EHogger, for the clarification. So I've misunderstood the role of $$anonymous$$atchTarget. In other words: The answer to my original question is: Yes, one can use $$anonymous$$atchTarget both for generic rigs. But I've expected it to do things which it is not meant for. In my case, it seems to be doing exactly what it should, only I didn't realize.

BTW: Yes, I checked both with and without Animate Physics enabled, but to no difference.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by coffiarts · Mar 02, 2013 at 08:49 AM

An answer to my own question, as described in the comments above (thanks to EHogger for helping me):

Yes, MatchTarget seems to work for generic rigs.

I only misunderstood its function: It is meant for adjusting an AvtarTarget's position and rotation, not for slowimg down an animation.

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

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

10 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

Related Questions

Mecanim - pause animation layer 1 Answer

animated rig - why aren't the joints limited in movement? 0 Answers

Trouble replacing a mesh on a pre-existing model 0 Answers

How to set animator's avatar by script? 0 Answers

Animation From blender to Unity Animator - Import Error 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