# \[BUG REPORTED\] Camera Position doesnt work with Light Function

**URL:** <https://forums.unrealengine.com/t/bug-reported-camera-position-doesnt-work-with-light-function/470884>\
**Category:** Rendering\
**Tags:** light-function, unreal-engine, bug-report, Shaders, Blueprint, question\
**Created:** [September 6, 2020, 12:03am UTC](https://forums.unrealengine.com/t/bug-reported-camera-position-doesnt-work-with-light-function/470884 "2020-09-06T00:03:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![LethalDumpster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LethalDumpster](https://forums.unrealengine.com/u/LethalDumpster)\
**Post date:** [September 6, 2020, 12:03am UTC](https://forums.unrealengine.com/t/bug-reported-camera-position-doesnt-work-with-light-function/470884/1 "2020-09-06T00:03:33Z")

</div>

Edit: [Unreal Engine Issues and Bug Tracker (UE-99353)](https://issues.unrealengine.com/issue/UE-99353)

Maybe this is a bug, but yeah. The Camera Position node when used in a light function, outputs seemingly nothing. I’ve done a manual workaround, by outputting the player camera position from a Blueprint to a Collection Parameter, and then the light function read from that Collection Parameter.  
While this \*works, its ineffective in editor. As it requires blueprints to be ticking, and requires the player camera. Are there any better solutions?

---

<div class="post-metadata">

**Author:** ![Okarii](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Okarii](https://forums.unrealengine.com/u/Okarii)\
**Post date:** [September 6, 2020, 12:41am UTC](https://forums.unrealengine.com/t/bug-reported-camera-position-doesnt-work-with-light-function/470884/2 "2020-09-06T00:41:22Z")

</div>

Can you elaborate on how its not working or share the context in which you are trying to use the the camera position node in a material? I just tested and verified and it appears to be working:

 ![312578-camerapos.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/b/f5bcaa44b081df8d230ad62ce081a25b6114a9cc.png)

![312579-cameraposition.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/b/4/cb4e7788d963a086688c37bce3c0ed667b90d00b.gif)

---

<div class="post-metadata">

**Author:** ![Okarii](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Okarii](https://forums.unrealengine.com/u/Okarii)\
**Post date:** [September 6, 2020, 12:43am UTC](https://forums.unrealengine.com/t/bug-reported-camera-position-doesnt-work-with-light-function/470884/3 "2020-09-06T00:43:00Z")

</div>

As a note, the same material color changes occur when moving the scene viewer camera around when not in play as well.

---

<div class="post-metadata">

**Author:** ![LethalDumpster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LethalDumpster](https://forums.unrealengine.com/u/LethalDumpster)\
**Post date:** [September 6, 2020, 12:54am UTC](https://forums.unrealengine.com/t/bug-reported-camera-position-doesnt-work-with-light-function/470884/4 "2020-09-06T00:54:45Z")

</div>

I’ve said it multiple times in my explanation. Light Function.

Make a material, set its Material Domain to Light Function. Then put this Material on any light source. The lightsource will output nothing, as the Camera Position node will be outputting nothing.

And so I had to make a workaround, which gets me Camera Position through other, less preferable means.

---

<div class="post-metadata">

**Author:** ![Okarii](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Okarii](https://forums.unrealengine.com/u/Okarii)\
**Post date:** [September 6, 2020, 1:12am UTC](https://forums.unrealengine.com/t/bug-reported-camera-position-doesnt-work-with-light-function/470884/5 "2020-09-06T01:12:45Z")

</div>

That is interesting, I was able to reproduce the same bug, I don’t know of another good working than what you have presented here. might want to report this one to them at [https://www.unrealengine.com/en-US/support/report-a-bug](https://www.unrealengine.com/en-US/support/report-a-bug)

---

<div class="post-metadata">

**Author:** ![LethalDumpster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LethalDumpster](https://forums.unrealengine.com/u/LethalDumpster)\
**Post date:** [September 6, 2020, 1:15am UTC](https://forums.unrealengine.com/t/bug-reported-camera-position-doesnt-work-with-light-function/470884/6 "2020-09-06T01:15:57Z")

</div>

Thankyou, I have just a few moments ago. Ill report back on the status of it, if/when I can spot it. According to the email, they wont tell me the status. I’ve gotta search for it myself, and will see it in the search once they have finally reviewed it…

---

<div class="post-metadata">

**Author:** ![LethalDumpster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LethalDumpster](https://forums.unrealengine.com/u/LethalDumpster)\
**Post date:** [September 9, 2020, 10:26pm UTC](https://forums.unrealengine.com/t/bug-reported-camera-position-doesnt-work-with-light-function/470884/7 "2020-09-09T22:26:17Z")

</div>

Ok, I did actually get an email response. And ofcourse responded with their requests.

> **[The Unreal Engine Issues and Bug Tracker](https://issues.unrealengine.com/issue/UE-99353)**
>
> Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

Hopefully this gets patched in the next update or hotfix.

---

<div class="post-metadata">

**Author:** ![Okarii](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Okarii](https://forums.unrealengine.com/u/Okarii)\
**Post date:** [September 9, 2020, 10:36pm UTC](https://forums.unrealengine.com/t/bug-reported-camera-position-doesnt-work-with-light-function/470884/8 "2020-09-09T22:36:17Z")

</div>

Awesome, nice followup, I’ve added my vote there!

---

<div class="post-metadata">

**Author:** ![LethalDumpster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LethalDumpster](https://forums.unrealengine.com/u/LethalDumpster)\
**Post date:** [September 9, 2020, 10:59pm UTC](https://forums.unrealengine.com/t/bug-reported-camera-position-doesnt-work-with-light-function/470884/9 "2020-09-09T22:59:06Z")

</div>

Thankyou. And FYI for anyone coming across this and is curious, this is my use case.

World height limited, and Camera localized underwater caustics. One directional light, that handles both above and below water lighting. Deeper you go, the darker it gets.

[](https://i.imgur.com/cTVcXcR.png)

It ofcourse has above and below exposure.

[](https://i.imgur.com/UJOoObH.png)

---

<div class="post-metadata">

**Author:** ![Twads9816](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/twads9816/32/1049194_2.png) [@Twads9816](https://forums.unrealengine.com/u/Twads9816)\
**Post date:** [March 24, 2023, 3:39pm UTC](https://forums.unrealengine.com/t/bug-reported-camera-position-doesnt-work-with-light-function/470884/10 "2023-03-24T15:39:21Z")

</div>

This bug is marked as reported in 4.25 and fixed in 4.27, but it still seems to be present in 5.1. Not sure if this is a regression but it is currently broken.
