I tried looking around for this idea but I couldn’t find much. I just want to know how big I should make the actual collision box of my character.
Should it coincide with how big the sprite will be? Or are there other factors to consider? Thank you
It really depends on how you want to use your character.
If you try to cover the whole size of sprite, the motion will be very strict: your character will be stuck in some seemingly passable places, just because the collision of a few extra pixels in you collision box. So making the collision box smaller makes it feel better in motion control.
But on the other hand, too small of a collision box makes life harder in other places. Like if your character need to enter a specific small area to trigger a function, a smaller collision box makes it harder to align you character inside the area, especially when the floor is ice.
So put more thought into what exactly you are doing with you character. And you can always just use the sprite size and change it later when bad things happen.
For this I understand, I think I’m going to have the hitbox pretty tight in alignment with the sprite since this game will be about combat mostly.
But what I meant for my original question was asking more of how big should the characters physics collisionbox be in the world space. For example originally I had it be around 2x8, now I’m going to change it to 62x24, but I’m still testing it.
I’m doing this to see if it solves some bugs I have and also since my sprites will be around that height anyways.
I was just wondering if anyone knew what were the pros and cons of having a larger or smaller colliderbox for the character, I looked around online but couldn’t find many answers.
It really depends on the game and what functional and visual needs you have. It’s not something that’s difficult to tweak and iterate on as you go, so just try some things out and see what feels and looks good in your game.
I thought by making the physics collider bigger size it would be more accurate since sometimes having a small collider, it would cause some innacurate results when the margin for error was smaller for certain things.