I was wondering if there was any way to shrink the player box in a platformer to match a ducking animation. In other words, if a character ducks under a projecile, the player box is the same so he still would get hit. I would like to know if I need to create a wholly different player object.
I'm guessing you have a hitbox for the player and an object for the visual side of the player. If that's true you could just do every tick -> set hitbox size to player size
Develop games in your browser. Powerful, performant & highly capable.
I would set the height of the hitbox to half of what it normally is when the down key is pressed - example here