# I don't understand modelX/modelY

**URL:** <https://discourse.processing.org/t/i-dont-understand-modelx-modely/43470>\
**Category:** Coding Questions\
**Created:** [December 13, 2023, 11:22pm UTC](https://discourse.processing.org/t/i-dont-understand-modelx-modely/43470 "2023-12-13T23:22:50Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [December 16, 2023, 7:31pm UTC](https://discourse.processing.org/t/i-dont-understand-modelx-modely/43470/12 "2023-12-16T19:31:17Z")

</div>

hello,

> [@PianoMastR64](#):
>
> why I might need this is if I want to check which object the mouse is hovering over so I can move it around

That’s a good point (no pun intended). Here you can use screenX and screenY and compare them to the mouse pos.  
Another method is an off-screen PGraphics, like point B here: [Selecting & Moving 3D Primitives - urgent - #3 by Chrisir](https://discourse.processing.org/t/selecting-moving-3d-primitives-urgent/14702/3)

> [@PianoMastR64](#):
>
> Another example is to click somewhere on the screen and spawn an object,

Another very good point!

In fact I asked this here: [Pro-Question: place a point in 3D with mouse](https://discourse.processing.org/t/pro-question-place-a-point-in-3d-with-mouse/6664) and  
here [P3D Formula : opposite of screenX and screenY is ...?](https://discourse.processing.org/t/p3d-formula-opposite-of-screenx-and-screeny-is/10121)

I still think this is solvable.

For example when you place a new cube, you could assume the same Z value as the previous cube. Then the new x and y should be calculable.

Chrisir

---

_[View the full topic](https://discourse.processing.org/t/i-dont-understand-modelx-modely/43470)._
