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
4
Question by Arcanafex · Jan 09, 2014 at 12:06 AM · mecanimavatarbonesik

How can I access Human Avatar bone and muscle values from a script

I have humanoid model that I used to create a Mecanim humanoid avatar, including adjusting the muscle limits. I am trying to manually animate the model using the rig and a combination of IK scripting and/or direct translation and rotation of the model's bones as accessed from the model's Animator component.

Unfortunately, all of the above seem to completely ignore the rig's muscle limit values.

I see that there are classes like HumanLimit, HumanTrait, HumanDescription, etc. that seem to be for the purpose of programmatic creation of human Mecanim avatars, but I'm not able to find any methods for getting any of the values from an already-created avatar (created with the Unity editor or otherwise). Rather than manually clamping all my rotations to the limits I want, is there some way to simply apply the avatar's limits to rotations using IK or Rotate() or any other manual movements of the model?

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 khos85 · Jan 18, 2014 at 03:12 PM 0
Share

Hi, I read your issue with interest, I have a similar issue, but I'd like to ask how did you adjust the muscle limits? I want to limit leg movements to say 10% ins$$anonymous$$d 90% angles/movement? Any advise would be most appreciated.

avatar image YoYoooooooo · May 27, 2014 at 09:52 AM 0
Share

Exactly same question here; still no answer?

avatar image khos85 · May 31, 2014 at 08:56 AM 0
Share

I gave up and ended up using blender to make animations, wow what a learning curve that is.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by tinyant · Jul 06, 2017 at 06:53 AM

  public static bool GetHumanDescription(GameObject target, ref HumanDescription des)
     {
         if (target != null)
         {
             AssetImporter importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(target));
             if (importer != null)
             {
                 Debug.Log("AssetImporter Type: " + importer.GetType());
                 ModelImporter modelImporter = importer as ModelImporter;
                 if (modelImporter != null)
                 {
                     des = modelImporter.humanDescription;
                     Debug.Log("## Cool stuff data by ModelImporter ##");
                     return true;
                 }
                 else
                 {
                     Debug.LogError("## Please Select Imported Model in Project View not prefab or other things ##");
                 }
             }
         }
         return false;
     }
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 tinyant · Jul 06, 2017 at 06:55 AM 0
Share

you can get the HumanDescription information by $$anonymous$$odelImporter. https://docs.unity3d.com/ScriptReference/HumanDescription.html

I am trying get the Human muscle values.

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

21 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

why is mecanim not seeing all of my bones ? 1 Answer

How to grab, pick and place an object to other location using Mecanim IK Script 2 Answers

Configuring Avatar 1 Answer

Mixing Unity Mecanim and Scripted Bones/States 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