# How Look at Rotation really works?!

**URL:** <https://forums.unrealengine.com/t/how-look-at-rotation-really-works/1849399>\
**Category:** Blueprint\
**Tags:** rotation, unreal-engine, vector, question, Blueprint\
**Created:** [May 10, 2024, 10:00am UTC](https://forums.unrealengine.com/t/how-look-at-rotation-really-works/1849399 "2024-05-10T10:00:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![DD\_Victor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DD\_Victor](https://forums.unrealengine.com/u/DD_Victor)\
**Post date:** [May 10, 2024, 10:00am UTC](https://forums.unrealengine.com/t/how-look-at-rotation-really-works/1849399/1 "2024-05-10T10:00:09Z")

</div>

Hey devs  
I’ve been trying to understand rotations it’s been so long and so far I still have no clue how it works.  
I have this very simple code on my BP in VR where I have a sphere collision on the motion controller and I set the actor BP to rotate following the hand movement.  
The idea here is to understand how the vector works and so far I’m failing miserably.

The X axis snaps 180 and always face opposite way of the hand position, I don’t understand it. WHY?!  
The Y axis doesn’t move vertically and snaps 180 degrees depending on the hand position. WHHYY?!?!  
The Z vector NEVER gets under horizon line so follow rotation will only work if following something rotating on Z axis. WWWWHHHHHHHHYYYYYYYY?!?!

  
 ![01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/3/5/c35e737fb85e407f54ea755c742e66f663789435.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:** [May 10, 2024, 10:55am UTC](https://forums.unrealengine.com/t/how-look-at-rotation-really-works/1849399/2 "2024-05-10T10:55:06Z")

</div>

Can you show the component hierarchy?

Which actor are we talking about here? Are you trying to set the actor to look at itself?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/3/2/1324f98384272a6e588c3d4d052be58fe23fab8d.png)

Look at only sets the X to point at the target, no guarantee about anything else…

I used this code

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/2/2/f221778f031b9525d67c64e2b8aa83f18396fd7f.png)

and got this

![lookat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/4/8040e06ff93a1fc966899258a14e681827d07201.gif)

---

<div class="post-metadata">

**Author:** ![DD\_Victor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DD\_Victor](https://forums.unrealengine.com/u/DD_Victor)\
**Post date:** [May 10, 2024, 3:05pm UTC](https://forums.unrealengine.com/t/how-look-at-rotation-really-works/1849399/3 "2024-05-10T15:05:40Z")

</div>

Hey thanks for the answer. That’s obvious but I haven’t noticed only X answers properly to the rotation.  
The actor in question is the the BP itself, which is a sphere with the thee axis arrows as children. I tried your way, basically switching the inputs on look at rotation and it looks like your one, but the issue for me is that node will do whatever it takes -apparently- to keep only X aligned to the target.  
Now that you said, I can’t rely on this node to set other rotation interactions then. I’ll try something else.  
Thanks again for replying.

---

<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:** [May 10, 2024, 3:22pm UTC](https://forums.unrealengine.com/t/how-look-at-rotation-really-works/1849399/4 "2024-05-10T15:22:36Z")

</div>

I’ve watched it for a little while, and it will always point the X with the Y on the right, and Z upwards. But, sometimes it flips during the change between one location and another.

You can constrain one other axis quite easily, with a direction vector and a ‘make rot from …’ node

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/d/7/1d731e153439a17c4736d414151464e473de2d7c.png)

It might help.

In the end, if you want total control over the rotation, then quaternions is the way. I never use them, so not very familiar, I think that means with using a plugin, or CPP.

---

<div class="post-metadata">

**Author:** ![DD\_Victor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DD\_Victor](https://forums.unrealengine.com/u/DD_Victor)\
**Post date:** [May 10, 2024, 3:24pm UTC](https://forums.unrealengine.com/t/how-look-at-rotation-really-works/1849399/5 "2024-05-10T15:24:51Z")

</div>

That’s the approach I’m trying now. Probably using make rotation is better than look at.  
I’ll post it whenever I get it working.  
Thanks!

---

<div class="post-metadata">

**Author:** ![sjunior3d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sjunior3d](https://forums.unrealengine.com/u/sjunior3d)\
**Post date:** [May 28, 2024, 4:49pm UTC](https://forums.unrealengine.com/t/how-look-at-rotation-really-works/1849399/6 "2024-05-28T16:49:56Z")

</div>

Have you found any solutions yet? I am still struggling with the same problem using a look at rotation node from “one hand” position targeting “another hand” using a Leap Motion. It always flips trying to keep the Z axis over the horizon line. It is driving me crazy! 😃

---

<div class="post-metadata">

**Author:** ![DD\_Victor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DD\_Victor](https://forums.unrealengine.com/u/DD_Victor)\
**Post date:** [May 29, 2024, 9:13am UTC](https://forums.unrealengine.com/t/how-look-at-rotation-really-works/1849399/7 "2024-05-29T09:13:31Z")

</div>

Yep,  
@ClockworkOcean gave the solution. Use the make rotation instead, considering the axis you want to point to the object (in my case the hand), it works like a charm.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [June 28, 2024, 9:14am UTC](https://forums.unrealengine.com/t/how-look-at-rotation-really-works/1849399/8 "2024-06-28T09:14:02Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
