[ODE] Body and object origin
Martin C. Martin
martin at metahuman.org
Thu Jul 3 21:15:02 2003
The origin of the box body must be at the center of mass.
Look into the transform geom.
- Martin
Frederic Ferland wrote:
>
> I have a fancy lamp hanging from the ceiling in a room in my engine. It is
> shaped more or less like a capital T that's been rotated 180 degrees. The
> origin of the object is at the extremity of the rope that attaches the
> object to the ceiling.
>
> I create two box geoms to represent the object. One is long and tall (for
> the rope) and the other is large and thin (for the bottom part of the
> lamp). I also create a box body and attach the lamp to the ceiling using a
> ball joint.
>
> ----------- <--- Box body
> I I
> I * <--I--- Object origin
> I * I
> -----*-----
> *
> *
> *
> *
> =========*===========
>
> When I run my program, everything is fine and the lamp hangs and swings
> from the ceiling like I intended. However, if I break the joint so that
> the lamp falls on the floor, it tries to 'stand' on it's rope instead of
> staying flat on it's bottom part like it would in real life, because the
> box body is centered on the object's origin rather than on what should
> normally be the heavy part of the object.
>
> My question is, do I have to change my object's origin so that it's in the
> bottom part of the lamp instead of the rope, or is there a way to have ODE
> distribute the weight of the body towards the bottom part instead of at the
> extremity of the rope? In other words, can I somehow offset the ODE body
> like I offset the geoms?
>
> Hope all this lengthy explanation is clear to everyone... :) Thanks for
> your help!
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode