# [ODE] move body and encapsulated objects in ODE

Jon Watte (ODE) hplus-ode at mindcontrol.org
Mon May 1 10:32:23 MST 2006

```

> 1) Cordinate system. Do i need to interchange my coordinates. I reason i

The coordinate system in ODE is whatever you want it to be. If you set
gravity to 0,-9.82,0, then it's Y up, with earth gravity, assuming SI units.

> 2) Since i am using triangulated meshes, do i need to use
> boxes/cylinders/spheres etc to build corresponding shape in ODE. My

Proxy objects will always perform better (use less CPU) and be more
stable. This is true for all physics APIs. Arbitrary, concave, triangle
mesh geometries are typically only used for static objects so that you
don't get trimesh/trimesh tests, only proxy/trimesh tests.

This means you probably have to model a separate representation of your
objects using proxy objects, and store that in the .X file, or a
parallel data file. That's what most games do.

> 3) How to do setposition of body and its many geoms's? Initially at the

Anything that moves with relation to something else is its own body. You
connect bodies with joints. The body is always positioned at the center
of gravity for that component of the object. Geoms are positioned
relative to a body, either using the new geom position functionality, or
using the geomtransform geom.

If a body moves, then the geoms that are attached to the body will move.
However, you should not setposition on bodies, as that will introduce
instability in the simulation (especially if there are joints or
collisions involved). Instead, let ODE run the simulation, and get the
position out of ODE.

> 4) In the ODE text_boxstack example, i could not understand this bit for
> composite objects under case 'x';

The "offset" part of dMass is ignored by bodies; the body-local origin
is always the center of gravity.

Cheers,

/ h+
```