Jump to content
  • Advertisement
Sign in to follow this  
DiaoAsian

OpenGL Putting Blocks Together.

This topic is 4021 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Dear all, I am new to OpenGL and I want to learn how to put 3 blocks together to form a "robo" hand. Do I join the blocks using translation? Or is there a much better way... My hand doesnt really move together and it looks like it can only move block by block instead of acting as a hand. Anyone?? Cheers

Share this post


Link to post
Share on other sites
Advertisement
If you're thinking purely about animating a kinematic arm then you could look up information about "hierarchical animation" or "skinning" (animating through a hierarchy of bones and joints). A simple hierarchy and the use of OpenGL's matrix stacks would be a good starting point.

Consider one block to be "locked in place", having only 3 DOF (degrees of freedom), namely rotation. You could rotate that block using a series of glRotatef calls. Next you would position the second block relatively to the first one using a translation (concatenated to the current transformation matrix). Then rotate the second block (in its local frame) and repeat for the third block.

If you are talking about moving one joint in order for the other bones to follow, OpenGL won't be able to help you out I'm afraid. You need to look into inverse kinematics (IK) instead.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!