[ODE] cylinder plane bug3

Tomek Klin klinikk at o2.pl
Wed Sep 20 04:05:41 MST 2006


Hi,

>  Hy,

> This is the latest version of test cyl. Witch shows cylinder bug

> I added a plane and moved cylinder and box to down on the plane instead of
> mesh. 
> Without the rotation ->cylinder stay on floor, with rotation the cylinder
> falls

> LR

this is third bug. order of geom in wrong .

and this is fix

cllide_cylinder_plane (line 223 +/- 5)

(...)
      // Contact 1
      Contact = SAFECONTACT(flags, contact, nContacts, skip);
      dVector3Copy(disc_top_pos, p);
      dVector3Add(p, x, Contact->pos);
+     Contact->g2 = planegeom;
+     Contact->g1 = cylgeom;
      Contact->depth = dFabs(dist_top);
      dVector3Copy(planenorm, Contact->normal);
      nContacts++;

(etc)
      // Contact 2
      
      // Contact 3
      
      // Contact 4
      
(...)

www.klinik.freehost.pl/download/collision_cylinder_plane.cpp


-- 
Tomek Klin



More information about the ODE mailing list