# Rotate plane so that it's side is facing the camera

**URL:** <https://forums.unrealengine.com/t/rotate-plane-so-that-its-side-is-facing-the-camera/799304>\
**Category:** Blueprint\
**Tags:** rotation, unreal-engine, vector, Blueprint, question\
**Created:** [March 22, 2023, 6:48pm UTC](https://forums.unrealengine.com/t/rotate-plane-so-that-its-side-is-facing-the-camera/799304 "2023-03-22T18:48:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asterix\_Us](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/asterix_us/32/549400_2.png) [@Asterix\_Us](https://forums.unrealengine.com/u/Asterix_Us)\
**Post date:** [March 22, 2023, 6:48pm UTC](https://forums.unrealengine.com/t/rotate-plane-so-that-its-side-is-facing-the-camera/799304/1 "2023-03-22T18:48:45Z")

</div>

Hey there! I’ve been trying to solve the math to find the rotation of a plane so that it’s side is always facing the camera. For reference, my game camera should be seeing this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/a/cfa99c87880eb491b06a34fffed0b31a074f87b2.jpeg)  
And in reality, the plane in 3D would be like this:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/8/e/98e0aeff7bb88104b822a0ad1c9ce3cb7f7e7555.jpeg)  
Any idea on how to calculate that? ☹

---

<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:** [March 22, 2023, 7:02pm UTC](https://forums.unrealengine.com/t/rotate-plane-so-that-its-side-is-facing-the-camera/799304/2 "2023-03-22T19:02:58Z")

</div>

There’s a node called ‘look at rotation’, solves all your problems 🙂

But you do have to make sure the X axis is the thing pointing…

---

<div class="post-metadata">

**Author:** ![Asterix\_Us](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/asterix_us/32/549400_2.png) [@Asterix\_Us](https://forums.unrealengine.com/u/Asterix_Us)\
**Post date:** [March 22, 2023, 7:21pm UTC](https://forums.unrealengine.com/t/rotate-plane-so-that-its-side-is-facing-the-camera/799304/4 "2023-03-22T19:21:03Z")

</div>

Okey? And get the look at rotation from where to where ?

---

<div class="post-metadata">

**Author:** ![BDC\_Patrick](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bdc_patrick/32/1104221_2.png) [@BDC\_Patrick](https://forums.unrealengine.com/u/BDC_Patrick)\
**Post date:** [March 22, 2023, 7:35pm UTC](https://forums.unrealengine.com/t/rotate-plane-so-that-its-side-is-facing-the-camera/799304/5 "2023-03-22T19:35:58Z")

</div>

from your starting point (the plane mesh location) to the target point (the camera location).

---

<div class="post-metadata">

**Author:** ![Asterix\_Us](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/asterix_us/32/549400_2.png) [@Asterix\_Us](https://forums.unrealengine.com/u/Asterix_Us)\
**Post date:** [March 22, 2023, 8:55pm UTC](https://forums.unrealengine.com/t/rotate-plane-so-that-its-side-is-facing-the-camera/799304/6 "2023-03-22T20:55:53Z")

</div>

Okey it worked but now I’m even more confused 😅 because my plan was to calculate the orientation for a Multi Box Trace By Channel  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/9/3/193772d83fc6282e4419c3e893cc2148349ca540.png)  
And it doesn’t work the same there…

---

<div class="post-metadata">

**Author:** ![pezzott1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pezzott1/32/1215068_2.png) [@pezzott1](https://forums.unrealengine.com/u/pezzott1)\
**Post date:** [March 22, 2023, 10:15pm UTC](https://forums.unrealengine.com/t/rotate-plane-so-that-its-side-is-facing-the-camera/799304/7 "2023-03-22T22:15:50Z")

</div>

Assuming you are continuing this post:

> [@Line tracing in screen space](https://forums.unrealengine.com/t/line-tracing-in-screen-space/795581/8):
>
> long screenshot is long: yeah, no. Forums do not like high res pics: script: project

You can try this to make the box trace oriented to the camera:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/7/297993b0165742050f55aca5fbc361bd05b0b8e2.png)

Result:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/c/7bce6616eb0c9bd92dc2b5a05f4110958bbb25bb.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/d/5/3d5122c2422d42c1bdf9377a9a320fceb718bc88.jpeg)

Hope it helps.

---

<div class="post-metadata">

**Author:** ![pezzott1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pezzott1/32/1215068_2.png) [@pezzott1](https://forums.unrealengine.com/u/pezzott1)\
**Post date:** [March 23, 2023, 1:36am UTC](https://forums.unrealengine.com/t/rotate-plane-so-that-its-side-is-facing-the-camera/799304/9 "2023-03-23T01:36:44Z")

</div>

Well… if the camera is at an angle then the box will be at an angle too. Wasn’t this what you had in mind?
