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 Maria Chernykh · May 23, 2013 at 07:12 AM · animationmecanimik

Mecanim hand IK

Hi there, I'm working in Mecanim and now I'm trying to use built in inverse kinematics for hands. But I have strange character behaviour in result: instead of touching the assigned object he streches the arm streight up all the time (see it on the screenshot). Any ideas? Thanks in advance.alt text

problem.png (79.7 kB)
Comment
Add comment · Show 11
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 Maria Chernykh · May 23, 2013 at 10:53 AM 0
Share

When I'm trying my ik script on the Unity default character (Dude), everything's working correctly. So I think it's something to do with avatar settings. I checked them, but it seems that everything is ok, it's done by the exalt textample of unity default avatar.

avatar.png (314.1 kB)
avatar image TonyLi · May 23, 2013 at 01:47 PM 0
Share

Can you post your ik script?

What happens if you drop your avatar into the I$$anonymous$$ example scene in the $$anonymous$$ecanim Example Scenes project and use it ins$$anonymous$$d of the spiky-haired guy? The scene has some spheres that you can move in the Scene View. The avatar's hands and feet should follow the spheres.

avatar image Maria Chernykh · May 23, 2013 at 01:56 PM 0
Share
  void OnAnimatorI$$anonymous$$()
     {
         if (_animator)
         {
             if (ikActive)
             {
                 _animator.SetLookAtWeight(1.0f);
                 _animator.SetLookAtPosition(_hit.point);
                 _animator.SetI$$anonymous$$PositionWeight(AvatarI$$anonymous$$Goal.RightHand, 1.0f);                _animator.SetI$$anonymous$$RotationWeight(AvatarI$$anonymous$$Goal.RightHand, 1.0f);
 _animator.SetI$$anonymous$$PositionWeight(AvatarI$$anonymous$$Goal.LeftHand, 1.0f);
 _animator.SetI$$anonymous$$RotationWeight(AvatarI$$anonymous$$Goal.LeftHand, 1.0f);
              _animator.GetI$$anonymous$$PositionWeight(AvatarI$$anonymous$$Goal.RightHand));
 if (_bent != null)
 {                    _animator.SetI$$anonymous$$Position(AvatarI$$anonymous$$Goal.RightHand, _gun.position);                    _animator.SetI$$anonymous$$Rotation(AvatarI$$anonymous$$Goal.RightHand, _gun.rotation);                    _animator.SetI$$anonymous$$Position(AvatarI$$anonymous$$Goal.LeftHand, _bent.position);                    _animator.SetI$$anonymous$$Rotation(AvatarI$$anonymous$$Goal.LeftHand, _bent.rotation);
                 }
             }
             else
             {
                 _animator.SetI$$anonymous$$PositionWeight(AvatarI$$anonymous$$Goal.RightHand, 0.0f);                _animator.SetI$$anonymous$$RotationWeight(AvatarI$$anonymous$$Goal.RightHand, 0.0f);               _animator.SetI$$anonymous$$PositionWeight(AvatarI$$anonymous$$Goal.LeftHand, 0.0f);               _animator.SetI$$anonymous$$RotationWeight(AvatarI$$anonymous$$Goal.LeftHand, 0.0f);
 
             }
         }
     }
avatar image Maria Chernykh · May 23, 2013 at 01:57 PM 0
Share

Sorry, I'm not fully aware of how make formatting here...

avatar image Maria Chernykh · May 23, 2013 at 02:22 PM 0
Share

I placed my character in the unity tutorial scene (mecanim tutorial), the robot from tutorial works fine with my script attached. But my robot placed on the scene again streches his hand... I search for people with the same problem and the only explanation that I can find is scale mismatching (my character has scale 100 for x,y,z and effector 0.03). But I don't know what to do anyway

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

14 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

Related Questions

Best way to do gun reload and move sway 0 Answers

Mecanim position specific bone 0 Answers

Mecanim OnAnimatorIK() execution order 1 Answer

Mixing Unity Mecanim and Scripted Bones/States 1 Answer

How to let humanoid hold gun? 0 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