# How can I find out where two lines touch?

**URL:** <https://phaser.discourse.group/t/how-can-i-find-out-where-two-lines-touch/12122>\
**Category:** Phaser 3\
**Created:** [August 4, 2022, 3:25pm UTC](https://phaser.discourse.group/t/how-can-i-find-out-where-two-lines-touch/12122 "2022-08-04T15:25:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 4, 2022, 3:26pm UTC](https://phaser.discourse.group/t/how-can-i-find-out-where-two-lines-touch/12122/2 "2022-08-04T15:26:39Z")

</div>

> [@Test intersection of two game objects (Phaser 3)](https://phaser.discourse.group/t/test-intersection-of-two-game-objects-phaser-3/8021):
>
> You can do this without physics. You copy the bounds of the game objects to rectangles and then use the [Phaser.Geom.Intersects](https://photonstorm.github.io/phaser3-docs/Phaser.Geom.Intersects.html) methods. Recycling the rectangles is efficient. Most game objects have two boundaries, possibly distinct: [Phaser.GameObjects.Components.GetBounds#getBounds()](https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Components.GetBounds.html#getBounds) and [Phaser.Display.Bounds.GetBounds()](https://photonstorm.github.io/phaser3-docs/Phaser.Display.Bounds.html#.GetBounds). If you’re not interested in transforms then GetBounds() is faster. [Phaser.Geom.Intersects.RectangleToRectangle()](https://photonstorm.github.io/phaser3-docs/Phaser.Geom.Intersects.html#.RectangleToRectangle) tells you whether the rectangles intersect at all, and [Ph…](https://photonstorm.github.io/phaser3-docs/Phaser.Geom.Intersects.html#.GetRectangleIntersection)

---

_[View the full topic](https://phaser.discourse.group/t/how-can-i-find-out-where-two-lines-touch/12122)._
