HElp with this...

ricardo_arango

22-10-2006 01:32:32

OK.. First picture is a box with 20 divisions, 1 bone every 2 divisions. The bones are in different colors...

The sencond picture is that box in Ogre, and the Debug View of a chain of boxes I created that are supposed to be linked to the bones.



My problem is updating the position of the bones using the positon of the boxes in the chain of boxes.. At the moment my callback is empty beause I don't know how to go about this...

Is there a way to get the Absolute position of the box and set the Absolute position of the bone? Or get the absolute position of a bone's parent, subtract the abolute position of the box, and set the resulting value as the bone's relative position?

Any help appreciated..

walaber

22-10-2006 06:58:42

have a look at my Ragdoll class in the ogrenewt demos, it does exactly what you are asking. it takes the global position/orientation of the current bone, and it's parent, and calculates the local orientation for the bone, to pass to Ogre.