![]() ![]() If you’re stuck with corners, then, you may want to use a corner bump, a term I just made up. Of course, that introduces a new problem: now the player can’t balance precariously on edges without their rounded bottom sliding them off. Alas. A popular alternative - especially in Unity where it’s a standard asset - is the pill-shaped capsule, which has semicircles/hemispheres on the top and bottom and a cylindrical body in 3D. ![]() A hitbox doesn’t have to be a literal box, after all. One way to handle corners is to simply remove them from conscious actors. Real-world bodies tend to be a bit rounder and squishier and this can tolerate grazing a corner even real-world boxes will simply rotate a bit.Īh, but in our faux physics world, we generally don’t want conscious actors (such as the player) to rotate, even with a realistic physics simulator! Real-world bodies are made of parts that will generally try to keep you upright, after all you don’t tilt back and forth much. Corners can catch on other corners, even by a single pixel. Treating the player (and indeed most objects) as a box has one annoying side effect: boxes have corners. the point where the entity is truly considered to be standing - so that the hitbox doesn’t abruptly move when the entity turns around!) Corners (One extra consideration for sprite games in particular: the hitbox ought to be horizontally symmetric around the sprite’s pivot - i.e. As a bonus (assuming this same box is used for combat), she won’t take damage from projectiles that merely graze past an ear. To compensate for this, the ear and tail are left out of the collision box entirely and will simply jut into a wall if necessary - a goofy affordance that’s so common it doesn’t even register as unusual. If that Eevee wanted to stand against a real-world wall, she would simply tilt her ear or tail out of the way, so there’s no reason for the ear to block her from standing against a game wall. This is especially true in cases like the above, where the tail and left ear protrude significantly out from the main body. Since the player has no direct control over the exact placement of their limbs, it would be slightly frustrating to have them collide with the world. Fairly often, this is a box, or something very box-like. Your avatar may play an animation that moves its legs back and forth, but since you’re not actually controlling the legs independently (and since simulating them is way harder), the game just treats you like a simple shape. When you walk in a video game, you press a single “walk” button. That is: when you walk with your real-world meat shell, you perform a complex dance of putting one foot in front of the other, a motion you spent years perfecting. ![]() The hitbox is the biggest physics fudge by far, and it exists because of a single massive approximation that ( most) games make: you’re controlling a single entity in the abstract, not a physical body in great detail. They’re usually the same in simple platformers, though, and that’s what most of my games have been. “Hitbox” is perhaps not the most accurate term, since the shape used for colliding with the environment and the shape used for detecting damage might be totally different. Something about how we tweak physics to “work” better in games?
0 Comments
Leave a Reply. |