After models and textures, the next concept within video games that can be arguably more important is “collision.” Collision is how something, either an entity (such as a model) or planes (such as the ground), interacts with something else. Collision, in other words, is what keeps a player from running through a rock or cliff side. Or a rock from falling through the ground like it was air.
Collision can have many different bugs, however, for many different reasons. One reason is if the hitbox — the invisible “box” that surrounds a model — fails to calculate interactions with other hitboxes correctly. This means that one character can end up passing through another character, instead of being blocked by them. It also means that a model can partially or completely pass through something solid, like a rock or a wall.
In the image above, the feet of the Pokemon are clipping through the texture of the cave ceiling. This is happening because either 1) the hitboxes of the Pokemon models don’t go over the feet, allowing the feet to stick through the ceiling, or 2) the collision for the ceiling wasn’t made for something to stand on it.
It is most likely the second option, seeing as the inside of the ceiling isn’t supposed to be something that is interactable.
This image also showcases another bug — bad spawning. But that is a bug that will be discussed in greater detail in a later blog.
In this image, the model for “Boreas,” the big round thing sticking partially out of the wall, has clipped into that wall. When he was walking around, the collision for the wall failed to interact with his hitbox, and he was able to walk through it. This led to him standing halfway through it.
The image above is a variation of the last clipping bug, but instead of clipping into the wall completely, the character is only clipping in partially. This is due to the fact that the hitbox and the collision of the wall aren’t aligned properly, allowing the player’s head to clip into the wall.
Part of this glitch also has to do with the bench in the photo. Because the bench also has a hitbox, the hitboxes of the bench and the player are fighting for that space. But because the bench is an unmoving object, the engine has to calculate where the player model is without clipping them fully into the bench or the wall.
This leads to the engine making a small mistake mathematically, allowing the player to only clip their head into the wall.
One thing that can occur when the player character clips completely through something is called out of bounds. What that means is the player is accessing an area of the game they were never meant to — behind a wall, inside an object, past a mountain range, etc..
Because of that, the vast majority of the time, objects that are out of bounds don’t have any collision or textures. This is to save on resources so the game runs smoother, and because the player was never meant to see and/or interact with them.
But sometimes, developers give something collision when it doesn’t need it. In the last image above, the ground behind the wall has collision, allowing the player to stand on it and explore further in. On top of that, the ground is also fully textured.
There was no reason to add those things behind the wall, but whoever was building this area added them anyway. Most likely by accident, or because it wasn’t worth trying to fix it.
But even with the many different aspects of collision that can go wrong, collision is something that is needed to make a video game feel more realistic and playable.