[ODE] How To Create A dBody Ground ?

Michael.Rauh at eads.com Michael.Rauh at eads.com
Thu Oct 21 17:30:50 MST 2004


Oh, there's the problem :) Well, you can follow the example from
boxstack.cpp. There, in the nearCallback, the bodies are extracted from the
geoms with

dBodyID b1 = dGeomGetBody(o1);
dBodyID b2 = dGeomGetBody(o2);

You should get a dBodyID of zero from your plane. Some lines below, when
the contact joints are created:

dJointID c = dJointCreateContact (world,contactgroup,contact+i);
dJointAttach (c,b1,b2);

you can see that the joint is simply attached to both bodies, regardless of
whether one of them is zero. So the joint
will be attached between your box and 0, that means the static environment,
and so only the box body is affected from
that collision.

So, go on and keep your great endurance with that stuff ;)

Greets
Michael





Yes Sir,  I follow the document, again. The goal is get the force between
box and ground. So I follow the document to create a dContactJoint, and it
must attatch two body. Becasue ContactJoint must attatch two bodies. box is
a body, so I must create a ground body ? sorry to trouble you, again. thank
you very much.



----- Original Message -----
From: <Michael.Rauh at eads.com>
To: "Ode at Q12. Org" <ode at q12.org>
Sent: Thursday, October 21, 2004 10:44 PM
Subject: Re: [ODE] How To Create A dBody Ground ?


>
> You do not want to assign a plane geom to a body. Anyways, contacts are
> created during collision detection, and that never cares about bodies.
>
> Someone suggested some days ago that you should perhaps go through the
> documentation once again carefully, because all that is explained very
> clear in there.
>
> Greets
> Michael
>
>
>
>
> I use ground with PlaneGeom.
>
> How can I set this ground with a dBody ?
>
> Becasue I want to use dContact between a box and ground.
>
> ground = dCreatePlaneGeom(dWorld, 0, 0, 1);
>
> it is not a body.
>
> thanks a lot ^^_______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
>
>
>
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode









More information about the ODE mailing list