Michael Carter wrote:

> I am trying to teach my mechanical man how to walk.

To learn to walk, one must first learn to crawl :)

> The legs emulate
> walking but the axis of rotation is too high on the X-axis.
>
> The upper legs separate from the hip as the legs move back and
> forward.  I need to know how to bring the axis of rotation down so
> the legs will stay in contact with the hips.

Usually the simplest solution to this is to make sure that the center of
your leg geometry is where you want the rotation to be. Rotations, as
generated by the rotation matrix is always around the origin of that
local coordinate system. This is what you are experiencing with the leg.
Without a screen grab to work by, it is difficult to say which way to
move the centre, but I suspect that the centre of your leg's geometry is
above the end of the leg, rather than the middle of it.

There are alternatives to shifting the leg geometry, such as using two
nested transforms, but that just gets really messy and convoluted to
deal with. Much simpler just altering the geometry.

--
Justin Couch                         http://www.vlc.com.au/~justin/
Freelance Java Consultant                  http://www.yumetech.com/
Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
                                              - Greg Bear, Slant
-------------------------------------------------------------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to