(conceptual) question about contact point generation
Posted: Sat Dec 08, 2018 4:44 am
Hi, I'm interested in reverse-engineering some of the physics behind Rocket League. Some of their developers mentioned that they use Bullet under the hood to handle some of the physics, and I was looking for some guidance about where to look for implementation details about how contact constraints might be generated for the case of a spherical ball colliding with an OBB hitbox.
My idea so far is to define a collision normal by taking the point, p, on the OBB that is closest to the sphere's center, c, and normalizing the difference (c-p). This seems to be working pretty well, but when that point p approaches an edge of the hitbox, my predictions start to disagree with the actual values. Also, the bullet user manual mentions a collision margin that makes OBB dimensions slightly smaller. Does that mean that objects that intersect that margin alone are ignored, or are somehow treated differently?
Could anyone help me better understand how bullet handles these things internally?
My idea so far is to define a collision normal by taking the point, p, on the OBB that is closest to the sphere's center, c, and normalizing the difference (c-p). This seems to be working pretty well, but when that point p approaches an edge of the hitbox, my predictions start to disagree with the actual values. Also, the bullet user manual mentions a collision margin that makes OBB dimensions slightly smaller. Does that mean that objects that intersect that margin alone are ignored, or are somehow treated differently?
Could anyone help me better understand how bullet handles these things internally?