# Find look at rotation but in materials

**URL:** <https://forums.unrealengine.com/t/find-look-at-rotation-but-in-materials/467666>\
**Category:** Rendering\
**Tags:** player-rotation, unreal-engine, question\
**Created:** [July 4, 2020, 11:26pm UTC](https://forums.unrealengine.com/t/find-look-at-rotation-but-in-materials/467666 "2020-07-04T23:26:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eee](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eee](https://forums.unrealengine.com/u/eee)\
**Post date:** [July 4, 2020, 11:26pm UTC](https://forums.unrealengine.com/t/find-look-at-rotation-but-in-materials/467666/1 "2020-07-04T23:26:36Z")

</div>

![306233-anotacion-2020-07-05-011419.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/1/0/010630e706656c934ea611151145935036d53b15.png)

Hello.  
I have Actor 1 = Light bulb location, and Actor 2 = Player location.  
Then I do a “find look at rotation”, and finally, I convert that value into a global material collection float parameter.

Is there a way to do this math in a material graph?

Is there an equal to “Find look at rotation” in materials? Or a way to do it with maths?

So far, I’ve only got this.

![306241-anotacion-2020-07-05-012507.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/2/4/c24381a5f8a3ec1639577eb64f14acb371d1a70b.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 5, 2020, 10:30am UTC](https://forums.unrealengine.com/t/find-look-at-rotation-but-in-materials/467666/2 "2020-07-05T10:30:27Z")

</div>

I can’t give you a specific answer, but I think you might have more joy looking into cross product, because from U and V it will give you the perpendicular.

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [July 5, 2020, 8:17pm UTC](https://forums.unrealengine.com/t/find-look-at-rotation-but-in-materials/467666/3 "2020-07-05T20:17:02Z")

</div>

I tested it a bit and it seems that this:

 ![306290-lookat.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/d/0/0d0ebadfb1196af393c546199a7cb908c5b7c593.png)

should give the same result as Find Look At Rotation’s Z component. Give it a try and say if it’s right for you.

---

<div class="post-metadata">

**Author:** ![Mifthbeat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mifthbeat/32/919874_2.png) [@Mifthbeat](https://forums.unrealengine.com/u/Mifthbeat)\
**Post date:** [August 11, 2022, 1:14am UTC](https://forums.unrealengine.com/t/find-look-at-rotation-but-in-materials/467666/4 "2022-08-11T01:14:29Z")

</div>

Here is my test. But we also need to rotate Normals and probably Tangents. In a case if a material has lighting.

> **[LookAt Test posted by Mifth | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/jiqs_m5l/)**
>
> No description provided
