# How to check x,y of object?

**URL:** https://discourse.processing.org/t/how-to-check-x-y-of-object/9345
**Category:** Coding Questions
**Created:** [March 16, 2019, 12:32pm UTC](https://discourse.processing.org/t/how-to-check-x-y-of-object/9345 "2019-03-16T12:32:02Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [March 16, 2019, 2:01pm UTC](https://discourse.processing.org/t/how-to-check-x-y-of-object/9345/2 "2019-03-16T14:01:44Z")

</div>

if you have a structure

> push / translate / rotate / scale / draw\_object() / pop

there is a way to know exactly where it is,  
if you save that info with:

> push / translate / rotate / scale / draw\_object()

```auto
  float jx = modelX(0, 0, 0);
  float jy = modelY(0, 0, 0);
  float jz = modelZ(0, 0, 0);

```

> pop

now can use that jx,jy,jz  
like for a collision…

old 3D test code here: [Trying to use modelX() but built a spiral galaxy of points - #4 by kll](https://discourse.processing.org/t/trying-to-use-modelx-but-built-a-spiral-galaxy-of-points/6064/4)

---

_[View the full topic](https://discourse.processing.org/t/how-to-check-x-y-of-object/9345)._
