# How to translate an object in Z - but keep its screen X and Y pos?

**URL:** <https://discourse.processing.org/t/how-to-translate-an-object-in-z-but-keep-its-screen-x-and-y-pos/38171>\
**Category:** Coding Questions\
**Created:** [July 31, 2022, 11:45am UTC](https://discourse.processing.org/t/how-to-translate-an-object-in-z-but-keep-its-screen-x-and-y-pos/38171 "2022-07-31T11:45:46Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![zenglenn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/zenglenn/32/5569_2.png) [@zenglenn](https://discourse.processing.org/u/zenglenn)\
**Post date:** [July 31, 2022, 2:28pm UTC](https://discourse.processing.org/t/how-to-translate-an-object-in-z-but-keep-its-screen-x-and-y-pos/38171/7 "2022-07-31T14:28:28Z")

</div>

i need to slide points along z to create an illusion of a 3d point cloud… this is based on a greyscale image input - where the brighter the pixel, the closer it is to the camera…  
once i move the points in z though - the camera fov changes their x y positions as you look head on - i need to fix this - these images show it better

Uploading: Screenshot 2022-07-31 at 15.00.28.jpg…  
Uploading: Screenshot 2022-07-31 at 15.00.00.jpg…

---

_[View the full topic](https://discourse.processing.org/t/how-to-translate-an-object-in-z-but-keep-its-screen-x-and-y-pos/38171)._
