Clipping with Rectangular hitboxes

This has been a problem for a long time and is a problem to get around. We all know that feeling when you move on a square hitbox and it stops your character due to clipping.


Yeah, it is annoying and would be really nice if it were fixed.


You can use longer rectangular objects to prevent clipping.
If you have ground objects with no behaviors, it will merge them all together.


So this issue is caused by floating point rounding when checking vertices that are touching each other, and the collision checker cannot tell which vertex is above/below the other due to their proximity.

The best way to avoid snagging vertices is to allow your level objects (or whatever the rectangles are sliding around on) to get merged together. When objects are merged, the vertices are removed, so there is no more snagging. I explain how that process works here:

1 Like