You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the bullet manual, the default algorithms used for collision detection are taken from this matrix:
box
sphere
convex, cylinder, cone, capsule
compound
triangle_mesh
box
boxbox
spherebox
gjk
compound
concaveconvex
sphere
spherebox
spheresphere
gjk
compound
concaveconvex
convex, cylinder, cone, capsule
gjk
gjk
gjk or SAT
compound
concaveconvex
compound
compound
compound
compound
compound
compound
traingle_mesh
concaveconvex
concaveconvex
concaveconvex
compound
gimpact
In Godot's bullet backend rigid bodies seem to use the default algorithms, however kinematic bodies seem to use gjk for all convex shapes including box and sphere.
This can make a major a difference for boxbox collisions when using large collision margins. Bullet uses the margin value to round out sharp edges with spheres that have a radius equal to the margin value. However, bullet's boxbox algorithm is a special case that does not use the margin value, while gjk does.
Here's a demonstration showing the difference for the boxbox case. I used OpenSCAD's minkowski() to generate visual representations of the exact collision shapes used by bullet in the gjk case. The red boxes are rigid bodies, the gray ones kinematic:
bullet-boxbox-collisions.mp4
There doesn't seem to be much difference for the spheresphere and spherebox cases, however minor differences in how rigid and kinematic bodies calculate the separation between shapes can contribute to #31981 (though this is not the main cause of that bug).
Steps to reproduce:
Create kinematic and rigid boxes with large margin values and collide them together.
Godot version:
3.2.3
OS/device including version:
N/A
Issue description:
From the bullet manual, the default algorithms used for collision detection are taken from this matrix:
In Godot's bullet backend rigid bodies seem to use the default algorithms, however kinematic bodies seem to use
gjk
for all convex shapes including box and sphere.This can make a major a difference for boxbox collisions when using large collision margins. Bullet uses the
margin
value to round out sharp edges with spheres that have a radius equal to the margin value. However, bullet'sboxbox
algorithm is a special case that does not use the margin value, whilegjk
does.Here's a demonstration showing the difference for the boxbox case. I used OpenSCAD's
minkowski()
to generate visual representations of the exact collision shapes used by bullet in thegjk
case. The red boxes are rigid bodies, the gray ones kinematic:bullet-boxbox-collisions.mp4
There doesn't seem to be much difference for the
spheresphere
andspherebox
cases, however minor differences in how rigid and kinematic bodies calculate the separation between shapes can contribute to #31981 (though this is not the main cause of that bug).Steps to reproduce:
Minimal reproduction project:
bullet-boxbox-collisions.zip
The text was updated successfully, but these errors were encountered: