I'm building a 3D platformer, and I'm having issues figuring out how I should determine whether the player has effectively jumped on an enemy to kill them.
My current approach uses "hurtboxes" above the enemies like so:
And if the player has a negative velocity and isn't grounded while they collide with that hurtbox, it will kill the enemy. This works pretty well, but isn't ideal because the hurtbox being too big makes killing them easy, but making it too small results in unexpected failure to kill the enemy, which would be frustrating to a player.
Is this typically how 3D platformers deal with this issue, or are there better ways?