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
1
Question by hysp · Dec 27, 2012 at 03:28 AM · rotationboneinverse kinematic

Move a bone without rotating it

Hi,

Sorry, Im new to Unity and my english is not good enough to explain what my problem is, but I will try (check the attached picture too).

The problem is, as far as I understand, in Unity bones are just nested transforms, and probably my maths aren't very good either.

So imagine the mesh in the picture is a finger with one single bone: when pointing in different locations I would like to move the ending point of the bone, without rotating it. Why without rotating it? Since if the bone is rotated, the whole mesh is rotated, and obviously a finger shouldn't rotate around its longitudinal edge, just move its end edge to another position.

Yesterday I asked if there is some way to move a bone using bone.start = new Vector3(x1,y1,z1); bone.end= new Vector3(x1,y1,z1); and I found that it is not possible, since movements are defined in forward kinematics, that is rotation and translation, because bones are transforms.

So I have been trying and found that if I apply forward kinematics trying to reach the target end position, performing rotations, the whole mesh is rotated since the bone is rotated. I would like to reach a point (move a bone) without rotating it, since the "flesh" around it should remain in the same position (top in top, left in left, etc.. ), I just want to move the position of my mesh without rotating it. What I'm doing bad? Is there any way to move the end point of the bone without using rotations?

hummm... I think that the problem is that I don't want rotations in the longitudinal axe. Definitely my maths are very weak, can someone point me how to understand this 3D maths problem? Detect wich transforms should be applied to a vector to become another one without rotations in one axe? Is there any 3D maths for beginers online resource or something like that, that would help me to perform inverse kinematics for a simple vector? (it is not even a chain of transforms as usual inverse kinematics)

Thank you!

alt text

problemilla.jpg (51.0 kB)
Comment
Add comment · Show 5
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 Fattie · Dec 27, 2012 at 09:13 AM 0
Share

You certainly win, very easily, the award "$$anonymous$$ost Interesting Questions Ever Asked By A New User"

avatar image Fattie · Dec 27, 2012 at 09:17 AM 0
Share

You also easily take the "$$anonymous$$ost stylish and casually competent diagrams and drawings" palme d'or for 2012! :)

avatar image Fattie · Dec 27, 2012 at 09:19 AM 0
Share

Just FTR, when you say "apply forward kinematics..." in P6/S1, what do you mean? ie, you are using a package, or mecanim or something, or what? Cheers

avatar image hysp · Dec 27, 2012 at 08:26 PM 0
Share

hahaha, thank you Fattie :D I'm not used to ter$$anonymous$$ology yet, with "forward kinematics" I mean normal animations (the opposite of inverse kinematics): using translations and rotations / keyframed animations. There is a lot to learn! Unity is quite big and $$anonymous$$aths are scary like a huge monster haha.

avatar image Fattie · Dec 27, 2012 at 08:41 PM 0
Share

math is easy! lol enjoy ..

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Fattie · Dec 27, 2012 at 09:17 AM

hysp , I believe the very simple answer to what you need is:

What you're basically saying is, after the move, you want the rotation, to be, in some certain rotation. (Indeed, "sort of like a natural finger.")

{Note that, IMO, there is no real natural meaning to "not rotate" when you twist/change something like a bone concept - it's like, whoever made the software in question left the bone rotation in some position that seems, to him or her, the "natural" outcome rotation wise of that bend - perhaps you see what I mean. Anyway, even if you don't see what I mean - it's irrelevant! :) }

Anyway in short, all you do is force the rotation to be what you prefer, after the other operation! That's it. So, in assembler:

 finger .. change per your IK pack, or whatever
 finger .. set the rotation "neutrally" as you want it

It is extremely common to have to do that sort of thing. A good example is very often you have a whole lot of code, and then, "no matter what" you end with a quick "LookAt" to keep everything oriented correctly. Hope this helps in some way.

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 hysp · Dec 27, 2012 at 08:31 PM 0
Share

Thank you! LookAt will do :-) Seems that you are always around to help people :-) It feels great to have a place like this where you can ask about difficulties while coding, see you arround Fattie!

avatar image Fattie · Dec 27, 2012 at 08:40 PM 0
Share

Funnily enough yes ... you can actually use "LookAt" specifically, in this situation.

I merely mentioned that as an example of something where you very often have to do it "each time through, at the end of doing some process"

Funny one! Really glad it helps all around, cheers.

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 'extra' root bone rotation 0 Answers

Player Chest rotates always in the same direction 0 Answers

Rotation relations and EulerAngles's mess 0 Answers

Two Bone IK constraint with more than 2 bones on my arm. 0 Answers

How to rotate bone relative to camera using LookAt 3 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