[ODE] Contacts filtering/merging
Marco Grubert
mgrubert at conitec.net
Wed May 19 19:39:46 MST 2004
Hi all,
A couple more observations: I have a testlevel with one cube dropping (-Z
direction) onto a tesselated plane (+Z normal). Using box geom vs. Trimesh
the normal is pointing along +Z and everything works out fine.
If instead of box I use a tesselated cube of same dimensions I get the the
same initial results (position,g1,g2, depth) except that the normal is now
pointing in -Z thanks to two lines
SMULT( Contact->normal, in_Normal, -1.0);
in collision_trimesh_trimesh.cpp. This causes the cube to spin wildly. If
instead I replace those lines with +1.0 it looks better (doesn't spin, but
motion is slow). Now SimpleUnclippedTest() in the same file does some sanity
checks on penetration depth and position. It assumes that a vertex can not
cause a penetration deeper than it has moved in the last timestep. This
assumes that contacts are always resolved within 1 timestep, which is
definitely not the case here.
Commenting the depth check out as in
if (dp >= 0.0 && ExamineContactPoint(in_col_v, in_n, in_v) )
{
out_depth = dp;
return true;
} else {
return false;
}
gives much better results and the trimesh-trimesh collision for slow moving
objects now almost resembles box-trimesh. The only problem is that if my
object has a high velocity it hits the ground and eventually explodes.
I am still not sure if the trimesh-trimesh code is partially broken or if I
need to adjust more parameters to make it work. Please comment.
- Marco Grubert
More information about the ODE
mailing list