# Yaw problem when try to lock an actor (3d sidescroller)

**URL:** <https://forums.unrealengine.com/t/yaw-problem-when-try-to-lock-an-actor-3d-sidescroller/489169>\
**Category:** Community & Industry Discussion\
**Tags:** sidescroller, rotation-direction, unreal-engine, question, yaw\
**Created:** [September 24, 2021, 9:46pm UTC](https://forums.unrealengine.com/t/yaw-problem-when-try-to-lock-an-actor-3d-sidescroller/489169 "2021-09-24T21:46:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![togaykurtulus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@togaykurtulus](https://forums.unrealengine.com/u/togaykurtulus)\
**Post date:** [September 24, 2021, 9:46pm UTC](https://forums.unrealengine.com/t/yaw-problem-when-try-to-lock-an-actor-3d-sidescroller/489169/1 "2021-09-24T21:46:50Z")

</div>

Hello,  
I ve got an issue about lock on target logic. I want the player lock an enemy and if it happens, player shouldn’t turn back to enemy. This is the same logic in 3d games, player lock an enemy and it is always face to enemy.  
normally, character yaws with controller but in this state, I want to player walk forward and walk backward when it locks.  
So here are blueaprints and a video  
Thank you

 ![349302-gomcam-20210925-0029400432.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/b/62b949c026bfe3ed438a8828b5063fae45e05847.png)

 ![349303-gomcam-20210925-0029580158.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/a/d/bade964866573ca51e06c16fe1242e6a68ae8e1f.png)

[https://drive.google.com/drive/folders/1HBrrerWu9Jiau2Mtvxb8FMtG87fQo\_ma?usp=sharing](https://drive.google.com/drive/folders/1HBrrerWu9Jiau2Mtvxb8FMtG87fQo_ma?usp=sharing)

---

<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:** [September 25, 2021, 9:06am UTC](https://forums.unrealengine.com/t/yaw-problem-when-try-to-lock-an-actor-3d-sidescroller/489169/2 "2021-09-25T09:06:29Z")

</div>

This is what the ‘lookatrotation’ node is for:

 ![349330-screenshot-4.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/b/a/5bad11c544bd567bd6ed958e7ded3e6bc60dbea9.jpeg)

I’m not sure it that’s right for you, in semi 2D, but something along those lines maybe…
