# Body.touching have two directions

**URL:** <https://phaser.discourse.group/t/body-touching-have-two-directions/7314>\
**Category:** Phaser 3\
**Created:** [August 31, 2020, 3:04pm UTC](https://phaser.discourse.group/t/body-touching-have-two-directions/7314 "2020-08-31T15:04:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![il-dev](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/il-dev/32/2217_2.png) [@il-dev](https://phaser.discourse.group/u/il-dev)\
**Post date:** [August 31, 2020, 3:04pm UTC](https://phaser.discourse.group/t/body-touching-have-two-directions/7314/1 "2020-08-31T15:04:25Z")

</div>

Hello. When two elements overlap on top, i have - {body.touching.up: true, body.touching.left: true}. On touching up i destroy enemy, on touch left - player. But overlap return touching them both. How can i solve this problem? Thank you.

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [August 31, 2020, 4:14pm UTC](https://phaser.discourse.group/t/body-touching-have-two-directions/7314/2 "2020-08-31T16:14:31Z")

</div>

You can compare [overlapX](https://photonstorm.github.io/phaser3-docs/Phaser.Physics.Arcade.Body.html#overlapX) and [overlapY](https://photonstorm.github.io/phaser3-docs/Phaser.Physics.Arcade.Body.html#overlapY) of the bodies, or check `player.body.velocity.y > 0`, or compare `center` of the bodies.

---

<div class="post-metadata">

**Author:** ![il-dev](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/il-dev/32/2217_2.png) [@il-dev](https://phaser.discourse.group/u/il-dev)\
**Post date:** [August 31, 2020, 5:04pm UTC](https://phaser.discourse.group/t/body-touching-have-two-directions/7314/3 "2020-08-31T17:04:40Z")

</div>

Thank you. I will try tomorrow and write the answer here
