I’ve been working on combat systems for a while now and would like to say I’ve gotten pretty decent at it. One of the biggest problems in my games is the hitboxes (and stun but that’s never gonna be perfect ). Right now to make my attacks do damage I weld a box to the blade or fist and when that box is touched it’ll start checking values to see if the thing it touched is a player it can attack(example: if the person you hit has IFrames or not). While it works it feels very inaccurate and inconsistent.
I was hoping someone may have a better way of going about this, I’m fairly new to scripting so sorry if this is a dumb question.
Coming back some years late and while raycasting is good for boss type hitboxes I find that as opposed to attaching a hitbox to the weapon simply make a large box in front of the player or whatever shape fits your needs of hitbox that appears when the attack is eligible to do damage and use that. Raycast hitbox may’ve improved since my last use but when I used it, it was inconsistent for common attacks such as an “M1”