# What the best way to lock on to a enemy?

**URL:** <https://forums.unrealengine.com/t/what-the-best-way-to-lock-on-to-a-enemy/466822>\
**Category:** Character & Animation\
**Tags:** fighting-game, unreal-engine, question\
**Created:** [June 16, 2020, 12:46pm UTC](https://forums.unrealengine.com/t/what-the-best-way-to-lock-on-to-a-enemy/466822 "2020-06-16T12:46:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EdBennett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EdBennett](https://forums.unrealengine.com/u/EdBennett)\
**Post date:** [June 16, 2020, 12:46pm UTC](https://forums.unrealengine.com/t/what-the-best-way-to-lock-on-to-a-enemy/466822/1 "2020-06-16T12:46:08Z")

</div>

Hi I’m putting together a dark soul like movement and I’m trying to put together a lock on functionality so that when you are lock-on to an enemy you will face it at all time. I have started to just set the rotation on tick, however I think this is probably the wrong approach.

Does anyone know a better way?

 ![304601-lockon.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/4/9/049f35d87b8f2e02f002cf8417271fca0827a889.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 16, 2020, 2:01pm UTC](https://forums.unrealengine.com/t/what-the-best-way-to-lock-on-to-a-enemy/466822/2 "2020-06-16T14:01:48Z")

</div>

Providing you’re using third person, something like this might be worth exploring:

 ![304621-annotation-2020-06-16-145920.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/5/e/d5e9eee279d34200e35c196cd90708853e895f44.jpeg)

You will need to flesh it out, of course - check whether the clicked _Target_ is an actual enemy. Currently this will lock to pretty much everything.

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/6/8/a68f8c43bd5acb1606915edbb11be3a1e63f1d83.gif)](https://gyazo.com/9efa8f9e5f332df58e7a43881d83946b)

---

<div class="post-metadata">

**Author:** ![EdBennett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EdBennett](https://forums.unrealengine.com/u/EdBennett)\
**Post date:** [June 16, 2020, 5:30pm UTC](https://forums.unrealengine.com/t/what-the-best-way-to-lock-on-to-a-enemy/466822/3 "2020-06-16T17:30:27Z")

</div>

Hi Everynone

Thanks for the response. It’s kind of what I’m doing at the moment. I just didn’t think tick was the best place for it. thanks great cheers
