[ODE] fall through a TriMesh

Sean S Cullen Sean at blackscreen.org
Mon Oct 17 09:57:19 MST 2005


The ground should probably not be a physical object.  Try changing
dJointAttach(joint, GeomGetBody(geom1), GeomGetBody(geom2)); to have one
of the params be NULL.  This tells ODE the physical object collided with
an imoveable object.

> Hello,
>
> I need some help with TriMesh Collision. I already looked at
> the examples, but my objects are falling through the Trimesh.
> I've a not plane Ground as a TriMesh and an Object with a
> Box as Geom.
>
> My Object if falling through the Ground and I've no Idea why.
> I hope for some help or some Ideas how I can debug this.
>
> All Densities are 5.0
>
> My Callback Code:
> <code>
>     const int NoCollision = 100;
>     dContact * hitspace = new dContact[NoCollision];
>     int hits = dCollide(geom1, geom2, NoCollision, &hitspace[0].geom,
> sizeof(dContact));
>
>     while (hits--)
>     {
>         hitspace[hits].surface.mode = dContactBounce | dContactSoftCFM;
> hitspace[hits].surface.mu = dInfinity;
>         hitspace[hits].surface.mu2 = 0;
>         hitspace[hits].surface.bounce = 0.0f;
>         hitspace[hits].surface.bounce_vel = 0.1f;
>         hitspace[hits].surface.soft_cfm = 0.01f;
>
>         dJointID joint = dJointCreateContact(world->id, ContactGroup ,
> hitspace+hits);
>         dJointAttach(joint, GeomGetBody(geom1), GeomGetBody(geom2));
>       }
>       delete[] hitspace;
> </code>
>
> If enabled Gravity just for my Object and not for the Ground.
>
> I've a second thought. What If my Object collides, how can I fix the
> Ground, so the ground is not moving, because something hit the Surface.
>
> I found something interesting. If my Object hits the TriMesh, the
> callback is called, but (hits == 0). I read something about normal
> Problems calculated
> by the Vertexorder, so I tried to collide from the other side, but the
> Problems are still there.
>
>
> I will be greatfull for any advice
>
> Simon Adler
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode





More information about the ODE mailing list