# Reading coordinates of line Game Objects

**URL:** <https://phaser.discourse.group/t/reading-coordinates-of-line-game-objects/12858>\
**Category:** Phaser 3\
**Created:** [February 8, 2023, 4:01pm UTC](https://phaser.discourse.group/t/reading-coordinates-of-line-game-objects/12858 "2023-02-08T16:01:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarlosManuelPrt](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/carlosmanuelprt/32/7212_2.png) [@CarlosManuelPrt](https://phaser.discourse.group/u/CarlosManuelPrt)\
**Post date:** [February 8, 2023, 4:01pm UTC](https://phaser.discourse.group/t/reading-coordinates-of-line-game-objects/12858/1 "2023-02-08T16:01:44Z")

</div>

Why i can’t read coordinate values of Line Game Objects?  
Thanks in Advanced.

I post here 3 examples Test of my code

**Test 1**

```javascript
curve = new Phaser.Curves.Line(new Phaser.Math.Vector2(50, 100), new Phaser.Math.Vector2(50, 550));

```

**Results in console window:**

curve.x = undefined  
curve.y = undefined  
curve.x1 = undefined  
curve.y1 = undefined  
curve.x2 = undefined  
curve.y2 = undefined

**Test 2**

```javascript
lineHz_1 = new myCurve({scene: this, x:0, y:0, x1:200, y1:125, x2:300, y2:125});

```

**Results in console window:**

lineHz\_1.x = 0  
lineHz\_1.x = 0  
lineHz\_1.x1 = undefined  
lineHz\_1.y1 = undefined  
lineHz\_1.x2 = undefined  
lineHz\_1.y2 = undefined

**Test 3**

```javascript
line = this.add.line(0,0, 25, 100, 25, 550, 0x00ff00).setOrigin(0);

```

**Results in console window:**

line.x = 0  
line.y = 0  
line.x1 = undefined  
line.y1 = undefined  
line.x2 = undefined  
line.y2 = undefined

---

<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:** [February 8, 2023, 8:26pm UTC](https://phaser.discourse.group/t/reading-coordinates-of-line-game-objects/12858/2 "2023-02-08T20:26:59Z")

</div>

These are all different classes. And none of them have `x1`, `y1`, etc. — that’s [Phaser.Geom.Line](https://newdocs.phaser.io/docs/3.55.2/Phaser.Geom.Line).
