I was trying to let my agent move following a bvh file. In other words, I was trying to control each of its DOF to make it move.
Since balljoint is still not supported now, I use three hinge joints to represent a ball joint. Like this:
<joint name="RootJoint_x_r" type="hinge" pos="0.0 0.0 0.0" axis="1 0 0" range="-180 180"/>
<joint name="RootJoint_y_r" type="hinge" pos="0.0 0.0 0.0" axis="0 1 0" range="-180 180"/>
<joint name="RootJoint_z_r" type="hinge" pos="0.0 0.0 0.0" axis="0 0 1" range="-180 180"/>
I thought the position for each of DOF should be the rotation around each axis. All together they should behave like an Euler Angle. However, it doesn’t.
When poition of ‘RootJoint_y_r’ and ‘RootJoint_z_r’ are all zero, changing the position of ‘RootJoint_x_r’ did make it rotate around x_axis.
However, when poition of ‘RootJoint_y_r’ and ‘RootJoint_z_r’ are deviate from zero, changing the position of ‘RootJoint_x_r’ actually didn’t make it rotate from x_axis, neither the global or local one. In fact, I found that it’s not rotating around any axis at all!
I thought it may be a bug? When I use Flex, it behave correctly as Euler Angle did.