[ODE] bad normals in capsule->box collision ?
russellbartley at kromestudios.com
Tue Aug 21 18:06:59 MST 2007
I've come across a rare case, where I believe the dCollideCapsuleBox() function returns a bad normal in the contact structure.
Stop me if it has already been flagged, or I'm barking up the wrong tree.
Inside this function it works out where on the box a collision occurs, and where along the capsules axis a collision would occur.
It then calls dCollideSpheres() passing in the location on the capsule axis and the capsule radius as the first sphere, and the location on the box as 1 sphere with a zero radius as the second sphere.
Inside of dCollideSpheres(), if the 2 centres of the spheres are identical, it cant work out a normal (rightly so), and invents a normal along the x axis. This is a fact of life in a sphere->sphere collision, but in the context of a capsule->Box collisionis not the answer.
I have a solution inside of dCollideCapsuleBox() that detects this problem before entering the dCollideSPheres function, and calculates the correct normal, but it is a little ugly.
Is my logic sound, and if so, has anyone come across this problem before? If so is there aa standard solution out there?
Also if this is true, I suspect dCollideCapsuleCapsule, and maybe even dCollideCapsuleSphere could suffer from the same problem?
This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ODE