Eli5: Why do objects making contact with each other look so weird in video games?

789 views
0

They almost kind of penetrate each other at the tips of the objects, then they get pushed back a little. For example, when you crash a car into a wall, a small part of the bumper goes through the wall then kinda gets pushed back idk how to explain it.

In:

In video games, objects have a “rendered appearance” and a “physics hitbox”. The two don’t always line up, especially when an object is curved.

It is called collision detection, it is part of the functionality of a video game along with many other functions like the physics calculations for object motion and image rendering. Like everything else the video game does, collision detection takes some computing time, the more accurately the program performs collision detection the less processing time is available for the other processes, so game designers compromise on how well the game achieves collision detection, reducing how much they do while making sure it doesn’t affect game play. For example if you walked up to a wall with a sniper rifle the muzzle would be the other side of the wall so you could fire while behind cover this shouldn’t work so they would adapt the detection for the sniper rifle so you can’t “cheat” in this way.

It did go through the wall and then was pushed back. Every frame in a video game is an approximation. You only have one frame (1/60 or 1/30 or whatever of a second) to decide what happened, and might have to correct it on the next one.