# How to handle collision detection & response in voxel engine with slopes?

• 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 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.

• 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 .. Aug 21 '17 at 19:24