[Odejava]Compound Objects

Hi all,
Does anyone know how to make a compouded object in odejava? I can create PlaceableGeoms (say a box or a sphere) then call Body.addGeom(PlaceableGeom) on it, but its not working. The Placeable geom that i add will have a translation of 0, 0, 0 no matter what…

I have a box (a tall one) and a sphere ontop in a single body, ode is saying that the sphere is in the middle of the box and so the compounded body tips over to its side and does a see-saw effect on it like the sphere is in the middle, when its not supposed to.

Does anyone have any ideas about this? I am using the latest release of odejava…

DP

The first thing to verify is that you are setting the position of the the Geom (relative to the Body) and not the GeomTransform.

Second, for some reason you need to call Body.setMassParemeters after adding your GeomS. You should not have to do this if you are using the latest CVS (as default inertial parameters are now specified). Hope this helps!

Thanks, this is what we are currently doing with the latest release. And the objects dont collide with anything, they just go straight through them.

Updating to the latest from CVS fixed the problem and now we have compounded objects…

great!
DP

glad it’s working :slight_smile:

I have found compound objects a bit strange at times.

If you need a demo, see: org.odejava.test.simple.MultiGeomTest (note this needs to be run though the org.odejava.xith3d.test.RunDemo test harness, or a port of that class).

Cheers,

Will.