# Setting AI to look at player using SetFocus

**URL:** <https://forums.unrealengine.com/t/setting-ai-to-look-at-player-using-setfocus/349341>\
**Category:** Community & Industry Discussion\
**Tags:** focus, look-at, unreal-engine, enemy, player, question\
**Created:** [March 2, 2016, 10:33pm UTC](https://forums.unrealengine.com/t/setting-ai-to-look-at-player-using-setfocus/349341 "2016-03-02T22:33:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shirk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shirk](https://forums.unrealengine.com/u/Shirk)\
**Post date:** [March 2, 2016, 10:23pm UTC](https://forums.unrealengine.com/t/setting-ai-to-look-at-player-using-setfocus/349341/1 "2016-03-02T22:23:09Z")

</div>

Ive got it working by the following, but now the AI is always looking at the player, even when running sideways. How would I set the AI to focus only for a brief period?

[http://i.imgur.com/SSjW9j0.png](http://i.imgur.com/SSjW9j0.png)

---

<div class="post-metadata">

**Author:** ![Shirk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shirk](https://forums.unrealengine.com/u/Shirk)\
**Post date:** [March 2, 2016, 10:33pm UTC](https://forums.unrealengine.com/t/setting-ai-to-look-at-player-using-setfocus/349341/2 "2016-03-02T22:33:58Z")

</div>

I have a very simple AI and Im trying to figure out how to get the AI to look at the player when they are damaged by them. I found the SetFocus node, but it doesnt seem to work. How can I achieve the AI looking at the player if I am standing behind them when I damage them.

---

<div class="post-metadata">

**Author:** ![Anaklosmos](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anaklosmos](https://forums.unrealengine.com/u/Anaklosmos)\
**Post date:** [March 28, 2016, 3:52am UTC](https://forums.unrealengine.com/t/setting-ai-to-look-at-player-using-setfocus/349341/3 "2016-03-28T03:52:00Z")

</div>

I have been trying to figure out the same thing. If you follow my link below to my question, it may help you out a little. We have not got it working completely yet, but we are getting very close. Good luck!

> **[Can I get an AI character to activate when I hit it with a line trace?](https://forums.unrealengine.com/questions/392404/can-i-get-an-ai-character-to-activate-when-i-hit-i.html)**
>
> Hey guys! As of now, I have a blueprint set up for the AI to follow me when I get in his field of view and he will stop following me when I leave his field of view. I am trying to “Shoot” a line trace at a zombie AI that I have set up, and I want him...

---

<div class="post-metadata">

**Author:** ![BreakMaker](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/breakmaker/32/971651_2.png) [@BreakMaker](https://forums.unrealengine.com/u/BreakMaker)\
**Post date:** [September 6, 2017, 8:00pm UTC](https://forums.unrealengine.com/t/setting-ai-to-look-at-player-using-setfocus/349341/4 "2017-09-06T20:00:03Z")

</div>

You can unset or clear focus following a delay.
