Left/right contact direction not correctly detected for 'object hitbox contact'

Hello,

Regarding the subject above, we are enabling AttackCollision after the player presses the attack button, which then triggers an attack on enemies.

However, when attacking enemies while being relatively close to them, the “Object Attack Hitbox Contact” action sometimes fails to correctly detect the left or right contact direction.

If there are any configuration errors or workarounds for this issue, please let us know.

testmovie

In this case, the hit detection mechanically determines the direction from which the hitbox makes contact. Therefore, in situations like the one shown in the video where the hitbox is completely filled by the attack box, it will be判定 that “all directions are in contact.”

This is the intended behavior. To work around this, you can consider the following methods:

  1. Instead of making the attack box appear instantaneously, set up an animation where it extends from the player toward the enemy.
    By making it extend, the part closer to the player will make contact first, allowing for correct hit detection. However, this requires animation setup and is somewhat cumbersome.

  2. Perform the hit detection by comparing the player’s X coordinate with your own X coordinate.
    This is simple, but be aware that it cannot handle cases like trap attacks where the player is on the right but the attack comes from the left.

1 Like

Thank you.
Understood as a specification.
Currently, we do not plan to implement the placement attack, so I would like to try implementing it using Option 2.