The current situation we are investigating and understanding is that it occurs when a player’s AttackCollision simultaneously contacts an enemy’s [valid] HitCollision.
While the collision detection between AttackCollision and HitCollision works correctly for multiple enemies, the HP reduction process is not being executed.
Additionally, for enemies whose HP does not decrease, the value of taken_damage is set to 0.
For enemies whose HP decreases normally, whether HP reduction occurs depends on their node order—only the enemy positioned higher in the node hierarchy among simultaneously hit enemies will have its HP reduced normally.
Furthermore, if an enemy whose HP has reached 0 is positioned at the top of the node hierarchy, and its HitCollision remains active, the HP of other enemies hit simultaneously will never decrease.
The object group to which it belongs, the layer/mask settings for AttackCollision and HitCollision, the group targeted by the attack, and the contact group for the object’s attack detection.
Due to combinations of these settings:
- HP decreases even though the attack detection did not hit
- Attack detection hits, but HP does not decrease
In addition to situations where contact occurs simultaneously, these behaviors can cause HP and contact detection to behave incorrectly.
Investigation Results
Conditions
・Player Object
Attack-hit group: Enemy
AttackArea: Layer 2 Mask 3
Group: Player
・Slime Object
HitArea: Layer 3 Mask 2
Group: Enemy
・Link from Slime’s AnyState
Contact with object’s attack detection, all directions
Ignore Owner: ON
Type: Object Group
Target: Player Group
・Result
Contact with attack detection
HP decreases
Conditions
・Player Object
Attack-hit group: Enemy
AttackArea: Layer 2 Mask 1 (anything except 3)
Group: Player
・Slime Object
HitArea: Layer 3 Mask 2
Group: Enemy
・Link from Slime’s AnyState
Contact with object’s attack detection, all directions
Ignore Owner: ON
Type: Object Group
Target: Player Group
・Result
Contact with attack detection!!!
HP does not decrease
※ Is the AttackArea mask meaningless?
※ Can contact occur even if Attack mask and Hit mask don’t match?
Conditions
・Player Object
Attack-hit group: Enemy
AttackArea: Layer 2 Mask 3
Group: Player
・Slime Object
HitArea: Layer 3 Mask 1 (anything except 2)
Group: Enemy
・Link from Slime’s AnyState
Contact with object’s attack detection, all directions
Ignore Owner: ON
Type: Object Group
Target: Player Group
・Result
No contact with attack detection
HP decreases!!!
※ What is this…
Conditions
・Player Object
Attack-hit group: Enemy
AttackArea: Layer 4 Mask 5
Group: Player
・Slime Object
HitArea: Layer 6 Mask 7
Group: Enemy
・Link from Slime’s AnyState
Contact with object’s attack detection, all directions
Ignore Owner: ON
Type: Object Group
Target: Player Group
・Result
No contact with attack detection
HP does not decrease
※ Expected
Conditions
・Player Object
Attack-hit group: Enemy
AttackArea: Layer 2 Mask 3
Group: test1
・Slime Object
HitArea: Layer 3 Mask 2
Group: Enemy
・Link from Slime’s AnyState
Contact with object’s attack detection, all directions
Ignore Owner: ON
Type: Object Group
Target: Player Group
・Result
No contact with attack detection
HP decreases!!!
※ Why is this happening!!!
Conditions
・Player Object
Attack-hit group: Enemy
AttackArea: Layer 1 Mask 1
Group: test1
・Slime Object
HitArea: Layer 1 Mask 1
Group: Enemy
・Link from Slime’s AnyState
Contact with object’s attack detection, all directions
Ignore Owner: ON
Type: Object Group
Target: Player Group
・Result
No contact with attack detection
HP decreases!!!
※ Why is this happening!!!
Conditions
・Player Object
Attack-hit group: test1
AttackArea: Layer 1 Mask 1
Group: player
・Slime Object
HitArea: Layer 1 Mask 1
Group: Enemy
・Link from Slime’s AnyState
Contact with object’s attack detection, all directions
Ignore Owner: ON
Type: Object Group
Target: Player Group
・Result
Contact with attack detection!!!
HP decreases!!!
※ What is the attack-hit group…
Conditions
・Player Object
Attack-hit group: Enemy
AttackArea: Layer 1 Mask 1
Group: player
・Slime Object
HitArea: Layer 1 Mask 1
Group: Enemy
・Link from Slime’s AnyState
Contact with object’s attack detection, all directions
Ignore Owner: ON
Type: Object Group
Target: test1
・Result
No contact with attack detection
HP decreases!!!
※ So why does it decrease!!!
Attack hits
A: The player’s attack hits the enemy
B: The enemy is hit by the player’s attack
A reduces the enemy’s HP
B is when the attack hitbox contacts the enemy’s AnyState
It seems the current specification is that “attack hitbox contact” and “HP reduction” are not the same thing.
1 Like