Hello!
I am trying to insert an upright (up being the positive Y-axis)
capsule into my simulation. The documentation says that a GeomCapsule
is aligned along the local Z-axis. I guess this means that I have to
rotate it around the X-axis to get it aligned along my world Y-axis.
Is this correct? As far as I can see I can to this with a
GeomTransform like this:
geom = ode.GeomTransform(space)
geom.setGeom(ode.GeomCapsule(None, RADIUS, HEIGHT))
geom.setRotation(reshape(rot((1, 0, 0), pi/2), (9,)))
(The complete file can be found here http://keso.brasse.org/capsule.py
(it's short))
However, when I run the simulation it behaves as if the capsule is
still aligned along the world Z-axis. What am I missing? Is the format
of the 9-tuple sent to setRotation() wrong? I assumed that the first
three values is the first row in the matrix.
Any ideas would be greatly appreciated!
Regards,
Mattias
|