I’m trying to use one aspect of the new multi-geom support. Specifically, I’m trying to add a single Geom to a body where the Geom’s center does not coincide with the body’s reference point. I started with code like this:
chassisBody.addGeom(new GeomBox(CHASSIS_WIDTH, CHASSIS_HEIGHT, CHASSIS_DEPTH));
And that works as expected. I then changed it to offset the geom relative to the body:
g = new GeomBox(CHASSIS_WIDTH, CHASSIS_HEIGHT, CHASSIS_DEPTH);
g.setPosition(V_CHASSIS_OFFSET);
gt = new GeomTransform("chassisTransform");
gt.setEncapsulatedGeom(g);
chassisBody.addGeom(gt);
But when I run the sim, the chassis body immediately disappears from view. I haven’t tried to track it down, but maybe it’s falling through the Trimesh terrain. This is also the behavior when V_CHASSIS_OFFSET is a zero vector (0, 0, 0), which I would expect to behave exactly as if there was no GeomTransform, just like the first code block.
Am I doing something wrong? I believe I’m doing things as the ODE docs say, but maybe I missed something.
-Tab