# Depth to World Position

**URL:** <https://forums.unrealengine.com/t/depth-to-world-position/315962>\
**Category:** Rendering\
**Tags:** Post-Processing, depth, unreal-engine, world-position, question\
**Created:** [April 22, 2015, 2:25pm UTC](https://forums.unrealengine.com/t/depth-to-world-position/315962 "2015-04-22T14:25:51Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Wontague](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wontague/32/1008648_2.png) [@Wontague](https://forums.unrealengine.com/u/Wontague)\
**Post date:** [November 4, 2021, 3:08pm UTC](https://forums.unrealengine.com/t/depth-to-world-position/315962/9 "2021-11-04T15:08:44Z")

</div>

For the above formula, remember to normalize vectors before taking a dot product.

```
WorldPosition = CameraPosition + CameraVector * { CustomDepth.r / 
    dot [normalize(CameraVector), normalize(CameraDirectionVector)] } 

```

Since getting the order of operations right took some thought - here’s the same setup in BP using a SceneDepth node:

 ![351948-ws-position-via-depth.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/f/e/5feb99f2c23b445445ed0b5bf734301a2eaa3c57.png)

Much thanks to everyone here over the last 6 years - really helped my understanding.

---

_[View the full topic](https://forums.unrealengine.com/t/depth-to-world-position/315962)._
