[ODE] Bug in Sphere Trimesh collider?
gcarlton at iinet.net.au
Tue Feb 15 08:35:29 MST 2005
I came across this recently. Its when degenerate triangles are used as
part of the trimesh data. Its best to ensure this doesn't occur by
weeding them out of the data before you pass it to ode. Alternatively
the code could ignore these type of triangles in the colliders - which
would be a good thing to add to ODE in general I suspect.
Mohsin Hasan wrote:
>We are trying to integrate ODE in our engine and as a first step trying to
>use ODE for doing level collision detection through Trimesh. Our level
>geometry is BSP and we have loaded it into ODE through the trimesh
>interface. We have started prototyping the collision of different primitives
>with level geometry. These include box and spheres so far. Boxes seem to be
>colliding just fine but we are having few issues with spheres. Whenever a
>sphere reaches towards a wall after rolling on the ground and as soon as it
>touches the wall, we get an assertion saying "Vector has zero size ..". We
>traced the error in the code and it seems the error is due to the Trimesh -
>Sphere collider returning incorrect triangles as touched primitives. For
>instance we are getting triangles with vertices like
>V0 = -5, -432.x, 0
>V1 = -5, -636.x, 0
>V2 = -5, -572.x, 0
>These vertices are used to create two vectors which in turn are used to
>create a plane in the function GetContactData(.). As the vectors formed by
>the above triangles are always parallel, we get their cross product to be a
>null vector which gives the assertion during the Normalization phase.
>Long story short, has anyone else also had such an issue? And if so, what
>was the solution for this. Is the trimesh - sphere collider robust? Or does
>it have these occasional issues?
>ODE mailing list
>ODE at q12.org
More information about the ODE