Projectile hits only occur at the center of the projectile, not based on its collision box
Currently no matter what size hitbox a projectile entity has, the damage will only be given to mobs hit by the centre of the projectile, regardless of how big the hitbox actually is.
Projectiles also hit their target before their model hits the entity, indicating the projectile hitbox is in front of the projectile.
Steps To Reproduce:
- Go into the snowball file and change the hitbox to something much larger like 5 and 5
- Line up 2 lines of entities and throw the snowball between them (as shown in the attached video)
- The mobs will get pushed out of the way, but they won't get hit by the snowball
Expected Behaviour:
- The collision box of a projectile is what determines how large the 'damage collision box' is.
Actual Behaviour:
- No matter how large the hitbox is, only entities colliding with the centre of a projectile take damage
- Unresolved
Gruntastic- 14
- 5
- Confirmed
- 495988
- Multiple
- add-on collision-box damage hitbox projectile
1.19.10.23 Preview - 1.20.41 Hotfix
1.19.10.23 Preview 1.18.10.27 Beta 1.18.10.26 Beta 1.18.0.24 Beta 1.18.0.22 Beta 1.18.0.20 Beta 1.17.40.23 Beta 1.17.40.20 Beta 1.17.30.24 Beta 1.17.30.23 Beta 1.17.30.22 Beta 1.17.30.21 Beta 1.17.30.20 Beta 1.17.11 Hotfix 1.17.20.22 Beta 1.17.20.21 Beta 1.17.10 1.17.10.23 Beta 1.17.1 Hotfix 1.17.10.20 Beta 1.17.0.58 Beta 1.17.0.56 Beta 1.17.0.54 Beta 1.17.0.52 Beta 1.17.0.50 Beta 1.16.230.56 Beta 1.16.230.54 Beta 1.16.220 1.16.230.50 Beta 1.16.220.52 Beta 1.16.220.51 Beta 1.16.220.50 Beta 1.16.210.61 Beta 1.16.210.60 Beta 1.16.201 Hotfix 1.16.210 1.16.221 Hotfix 1.17.0 1.18.2 Hotfix 1.18.30.33 Preview 1.18.12 Hotfix 1.19.20.24 Preview 1.19.11 Hotfix 1.19.50 1.19.63 1.20.50.22 Preview 1.20.50.23 Preview 1.20.41 Hotfix
Created Issue:
Projectile Hitboxes Are Broken
Currently no matter what size hitbox a projectile entity has, the damage will only be given to mobs hit by the centre of the projectile, regardless of how big the hitbox actually is.
Projectiles also hit their target before their model hits the entity, indicating the projectile hitbox is in front of the projectile.
Steps To Reproduce:
- Go into the snowball file and change the hitbox to something much larger like 5 and 5
- Line up 2 lines of entities and throw the snowball between them
- The mobs will get pushed out of the way, but they won't get hit by the snowball
Expected Behaviour:
- The collision box of a projectile is what determines how large the 'damage collision box' is.
Actual Behaviour:
- No matter how large the hitbox is, only entities colliding with the centre of a projectile take damage
Currently no matter what size hitbox a projectile entity has, the damage will only be given to mobs hit by the centre of the projectile, regardless of how big the hitbox actually is.
Projectiles also hit their target before their model hits the entity, indicating the projectile hitbox is in front of the projectile.
Steps To Reproduce:
- Go into the snowball file and change the hitbox to something much larger like 5 and 5
- Line up 2 lines of entities and throw the snowball between them (as shown in the attached video)
- The mobs will get pushed out of the way, but they won't get hit by the snowball
Expected Behaviour:
- The collision box of a projectile is what determines how large the 'damage collision box' is.
Actual Behaviour:
- No matter how large the hitbox is, only entities colliding with the centre of a projectile take damage
relates to
relates to
Projectile Hitboxes Are BrokenProjectile hits only occur at the center of the projectile, not based on its collision box
Entities can have a collision box that affects their interactions with blocks and entities in the game without repelling or "colliding" with mobs, simply by setting
"minecraft:pushable": { "is_pushable": false
This is how vanilla armor stands work. I have attached a behavior pack that fixes this bug by applying this setting to thrown tridents: Collisionless trident.mcpack
.
Note that this setting does not impact the ability of tridents to hit mobs. Projectile hits do not use either the is_pushable setting or the collision box (the latter is reported as a bug at MCPE-118695).
The trident collision box is as follows, from thrown_trident.json:
"minecraft:collision_box": { "width": 0.25, "height": 0.35 },
The hitting before the model appears to hit the entity is tracked separately at MCPE-109423 and has nothing to do with the hitbox. It is caused by the speed of the projectile being > 1 block/tick and the game not updating the projectile's position after it calculates a hit based on its trajectory.