• Voxels are fairly small
  • An object can span an area of 8x8x8 or more
  • Vertices of Voxel Type are always snapped to the grid:

Voxel Types

  • Voxel types are convex (except the second type - which can be thought of as an OR between two rotated voxels of third type)

  • Including all the configurations of the above, there are 77 distinct voxel types.

Seems like there could be a fairly simple algorithm for doing collision detection and response between AABB / Bounding-Box / sphere and a single Voxel - considering the simple and rigid geometry restrictions in place, but I can't come up with one at the moment.

  • \$\begingroup\$ Just an idea: the set of collision positions should be easy to calculate. You could determine the Minkowski addition (en.wikipedia.org/wiki/Minkowski_addition) of your collision volume with the 6 shapes defined above and store them in a LUT. The other 71 don't need to be stored due to symmetry. To determine if your object has a collision at a specific position, compare its position to the shifted Minkowski sums of all nearby voxels (as determined in broad phase collision procedure). This would just be a simple lookup + coordinate shift operation. Resolution is a different story .. \$\endgroup\$ Commented Aug 21, 2017 at 19:24

1 Answer 1


There is a fairly simple way to do collision detection between a single "voxel shape" and an AABB.

It relies on the SAT (separating axis theorem) - finding a plane which separates both objects. As soon as we find one we know there's no collision.

First off checking all planes of AABB of the voxel and then again against all sloped planes of the voxel.

4th voxel type also has 3 potential sloped edges to check against.

Now this only handles the collision detection part. In order to resolve the collision after we find that objects intersect, we have to enumerate all the potential separating planes to see which one has the least amount of overlap - and then move the object away along the plane normal using the penetration depth.

The real tricky part is figuring out how to resolve collision vs multiple sloped voxels at the same time - there are multiple penetration vectors and distances.

enter image description here


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .