1
\$\begingroup\$

I currently can rotate around a pivot point by first translating to the pivot point then performing the rotation and finally translating back to the origin. I do that easily enough for the shoulder in my example. However I cannot figure out how to also add in a rotation around the elbow for the forearm.

I've tried the following for the forearm rotation around the elbow:

  1. translate to shoulder, rotate, translate to origin, translate to forearm, rotate, translate to origin
  2. translate to shoulder, rotate, translate to forearm, rotate, translate to shoulder, translate to origin

Neither work for me. Any suggestions? I'm really stuck on this one.

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

The transformation that you are describing is relatively simple and as you can see is very difficult to know what steps must be follow to achieve it.

When you solve this, you'll find with more problems with the next transformation. Then I encourage you to use "Hierarchical Transformations", at end of this article is described.

With "Hierarchical Transformations" you save a simple transformation ( a matrix for example ) in each node of the hierarchy. A node can be the arm, other the elbow, forearm, legs, etc. The final transformation is acomplished with the combination of all the simples transformations. Once the system is built, whatever transformation is easy to achieve.

\$\endgroup\$
0
\$\begingroup\$

Have you tried doing the forearm transformation first? I think you may just have the transforms in the reverse order.

\$\endgroup\$
2
  • \$\begingroup\$ I just tried it. I was hopeful but it looks the same as before. \$\endgroup\$
    – Xavier
    Commented Mar 31, 2011 at 2:53
  • \$\begingroup\$ One thing I'm doing that I'm beginning to suspect I shouldn't is that each time I animate I perform the transforms from the last position instead of the mesh at the origin. Do you think perhaps I should always do the transform of the mesh from the origin? \$\endgroup\$
    – Xavier
    Commented Mar 31, 2011 at 3:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .