# Set Focus - AI looking down

**URL:** <https://forums.unrealengine.com/t/set-focus-ai-looking-down/411289>\
**Category:** AI\
**Tags:** aiming, unreal-engine, question, Blueprint\
**Created:** [December 3, 2017, 8:40pm UTC](https://forums.unrealengine.com/t/set-focus-ai-looking-down/411289 "2017-12-03T20:40:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dante6686](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dante6686](https://forums.unrealengine.com/u/Dante6686)\
**Post date:** [December 3, 2017, 8:40pm UTC](https://forums.unrealengine.com/t/set-focus-ai-looking-down/411289/1 "2017-12-03T20:40:18Z")

</div>

Hi all. Does anyone know why AI controlled character is looking down at the base of a pawn set to be the focus via ‘set focus’ node? I can’t seem to find a way to control the aiming of the AI characters

---

<div class="post-metadata">

**Author:** ![MarcoMariaRossi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/marcomariarossi/32/1069093_2.png) [@MarcoMariaRossi](https://forums.unrealengine.com/u/MarcoMariaRossi)\
**Post date:** [February 8, 2019, 2:28pm UTC](https://forums.unrealengine.com/t/set-focus-ai-looking-down/411289/2 "2019-02-08T14:28:36Z")

</div>

Did you ever find out ?

---

<div class="post-metadata">

**Author:** ![Dante6686](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dante6686](https://forums.unrealengine.com/u/Dante6686)\
**Post date:** [February 8, 2019, 5:17pm UTC](https://forums.unrealengine.com/t/set-focus-ai-looking-down/411289/3 "2019-02-08T17:17:04Z")

</div>

No. I’ve created another actor, a sphere and attached it to player at one of the spine bones and then set the AI focus to that sphere actor instead of player. Best I could think of

---

<div class="post-metadata">

**Author:** ![MarcoMariaRossi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/marcomariarossi/32/1069093_2.png) [@MarcoMariaRossi](https://forums.unrealengine.com/u/MarcoMariaRossi)\
**Post date:** [February 8, 2019, 9:01pm UTC](https://forums.unrealengine.com/t/set-focus-ai-looking-down/411289/4 "2019-02-08T21:01:17Z")

</div>

I was trying a similar thing but somehow my characters head rotate in a single axis (horizontal) and I’m not sure why. Do you have full control that way ? Here is my situation btw : [https://m.imgur.com/account/inediblered/images/NZWD6UU](https://m.imgur.com/account/inediblered/images/NZWD6UU)

---

<div class="post-metadata">

**Author:** ![SenseiHaketon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SenseiHaketon](https://forums.unrealengine.com/u/SenseiHaketon)\
**Post date:** [February 11, 2019, 1:34pm UTC](https://forums.unrealengine.com/t/set-focus-ai-looking-down/411289/5 "2019-02-11T13:34:11Z")

</div>

SetFocus probably sets the focus point to the pivot (root) of the target actor.

You can use SetFocalPoint to manually set the exact location the AI should look at. You could get the world location of a bone or specific component and set the focal point with this position.

---

<div class="post-metadata">

**Author:** ![Dante6686](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dante6686](https://forums.unrealengine.com/u/Dante6686)\
**Post date:** [February 11, 2019, 1:54pm UTC](https://forums.unrealengine.com/t/set-focus-ai-looking-down/411289/6 "2019-02-11T13:54:15Z")

</div>

Yes, it seems to focus on a pivot which, for the capsule or the character will be at the bottom. As far as I remember SetFocalPoint is one time event, as in: it snaps to where you want but as soon as you move it doesn’t follow that point as it does when you use SetFocus

---

<div class="post-metadata">

**Author:** ![SenseiHaketon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SenseiHaketon](https://forums.unrealengine.com/u/SenseiHaketon)\
**Post date:** [February 11, 2019, 1:59pm UTC](https://forums.unrealengine.com/t/set-focus-ai-looking-down/411289/7 "2019-02-11T13:59:30Z")

</div>

The solution you provided above works fine.  
You could also execute SetFocalPoint in your Event Tick.

---

<div class="post-metadata">

**Author:** ![Dante6686](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dante6686](https://forums.unrealengine.com/u/Dante6686)\
**Post date:** [February 11, 2019, 2:05pm UTC](https://forums.unrealengine.com/t/set-focus-ai-looking-down/411289/8 "2019-02-11T14:05:21Z")

</div>

Yeah, I guess you could do SetFocalPoint on tick if it doesn’t impact the performance

---

<div class="post-metadata">

**Author:** ![SenseiHaketon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SenseiHaketon](https://forums.unrealengine.com/u/SenseiHaketon)\
**Post date:** [February 11, 2019, 2:13pm UTC](https://forums.unrealengine.com/t/set-focus-ai-looking-down/411289/9 "2019-02-11T14:13:38Z")

</div>

I guess SetFocus does the same thing internally.

---

<div class="post-metadata">

**Author:** ![NinjaRoot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NinjaRoot](https://forums.unrealengine.com/u/NinjaRoot)\
**Post date:** [July 13, 2024, 12:00am UTC](https://forums.unrealengine.com/t/set-focus-ai-looking-down/411289/10 "2024-07-13T00:00:01Z")

</div>

The best would be to **create an AI Task** to use inside an **AI Behavior Tree**.  
Then **calculate focal point** based on **character location** and increase the Z offset to reach the head by adding the capsule half height to the Z offset.

 ![Captura de ecrã 2024-07-13 005256](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/8/3/483de5a1991230856d13842d1cb180178e0f7488.png)
