Just something simple but important I've been thinking about. What sort of shape would you guys recommend for a player hitbox? This is in a physics simulated environment such as Box2D but I guess it applies for Chipmunk as well. (Making a platformer game). I'm asking because I've tried a few different shapes and they all have their own pros and cons:
* Just a square/rectangle.
It works well in boxy environments but a lower-edge corner can sometimes collide with obstacles when jumping. You don't want this because the player animation is currently jumping and it looks wrong (this may be an issue with my sprite sheet though). The simulator can also seem to be confused for detecting normals of collisions when for example landing directly into a 90 degree corner (did I just hit the wall or floor?), which in my case locks out the player from doing certain animations etc. And I haven't tried slopes yet but how would that even work unless you allow the rotation of the player to follow the slope? I have currently set my player to disable its rotation.
* Circle.
This one I assume will slide down slopes by itself. It tends to slide off edges if you're standing too close to one. You sometimes even manage to crawl up edges from jumps you shouldn't have made. You remove the corner collision issue though.
* Diamond shape.
I tried setting a diamond shaped hitbox but it failed because the player could slide up 90 degree edges just like the circle shape allowed. The player could also squeeze into sections( and not get out easily) where he shouldn't be because the "jags" on the sides of the hitbox allowed this.