[ODE] bad normals in capsule->box collision ?

Oleh Derevenko oder at eleks.lviv.ua
Wed Aug 22 09:19:00 MST 2007

Hi Remi

----- Original Message ----- 
From: "Remi Ricard"
To: "Oleh Derevenko"

>>> The problem was created when the capsule and the box were barely
>>> touching each other by the sphere part. The "penetration" distance was 0
>>> and the vector from point on shell of the sphere to the point on the box
>>> was almost zero (1e-16 in the wrong direction) then this created a
>>> normal vector in the wrong direction.
>>> I also created a small test program that show the problem but I did not
>>> know how to solve it.
>> If a sphere touches anything, the normal vector is the radius vector of 
>> the sphere to the point of contact.
> This is true for a hard sphere.
> But with ODE there can be some penetration. Ode use (I think) this 
> penetration distance to find the normal vector and this is why sometime I 
> get and inverted normal.

Please read my message carefully. I said "If a sphere touches...". If the 
sphere touches there is no penetration. These cases should be handled 
separately. If penetration depth is greater than some small value the case 
should be handled normally, as it is done now. But if penetration depth is 
very small the case should be considered to be "a touch" an conatct normal 
should be generated from sphere radius.

Oleh Derevenko
-- ICQ: 36361783

More information about the ODE mailing list