# LookAt vector in material?

**URL:** <https://forums.unrealengine.com/t/lookat-vector-in-material/373492>\
**Category:** Rendering\
**Tags:** point, unreal-engine, vector, question\
**Created:** [October 16, 2016, 4:30pm UTC](https://forums.unrealengine.com/t/lookat-vector-in-material/373492 "2016-10-16T16:30:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [October 16, 2016, 4:30pm UTC](https://forums.unrealengine.com/t/lookat-vector-in-material/373492/1 "2016-10-16T16:30:35Z")

</div>

Is there a way to calculate LookAt vector (from point 1 to point 2) in materials?

---

<div class="post-metadata">

**Author:** ![Deathrey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deathrey](https://forums.unrealengine.com/u/Deathrey)\
**Post date:** [October 16, 2016, 4:42pm UTC](https://forums.unrealengine.com/t/lookat-vector-in-material/373492/2 "2016-10-16T16:42:13Z")

</div>

For what it takes, vector from **StartPoint** to **EndPoint**** = **** EndPoint - StartPoint**

If you need a unit vector, you can normalize the result after.

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [October 16, 2016, 4:57pm UTC](https://forums.unrealengine.com/t/lookat-vector-in-material/373492/3 "2016-10-16T16:57:19Z")

</div>

Oh. Thanks! 🙂
