Hitboxes and Hurt Boxes


With the addition of an interact system to the player character, the hitbox and hurt boxes I thought were functioning properly were not. When I originally integrated them into the weapons, enemies, and player character damage was being passed successfully from character to character. However, with the interaction system just implemented, damage was no longer being passed. When I went to debug, the collider overlap from the hit box would send me straight into the interact event of the player character. I had filtered out checks for self when I originally created the hitboxes and the player weapon hadn't hit the player character in all my prior testing so I was very confused. 

It turns out I had gotten lucky. The reason I didn't find this bug earlier was due to hitbox placement on the weapon. At no point in my original testing was the player weapon overlapping the player character to begin with. As I debugged more and more, I found that the hierarchical parent I thought I had filtered out was completely wrong. The filter was not catching the player character's actor, but the player character's controller. While I was using the correct nodes, I was targeting the wrong actors with my filter. By adjusting the parameters of the filter I was able to properly filter out everything but hitboxes and hurt boxes. To ensure this would not happen again, I even made an object layer specifically for hitboxes and hurt boxes. 

Leave a comment

Log in with itch.io to leave a comment.