# SetFocus ignoring Z axis when target is a TargetPoint 

**URL:** <https://forums.unrealengine.com/t/setfocus-ignoring-z-axis-when-target-is-a-targetpoint/2673220>\
**Category:** AI\
**Tags:** focus, unreal-engine, Blueprint, question\
**Created:** [November 9, 2025, 2:18pm UTC](https://forums.unrealengine.com/t/setfocus-ignoring-z-axis-when-target-is-a-targetpoint/2673220 "2025-11-09T14:18:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WEASELS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WEASELS](https://forums.unrealengine.com/u/WEASELS)\
**Post date:** [November 9, 2025, 2:18pm UTC](https://forums.unrealengine.com/t/setfocus-ignoring-z-axis-when-target-is-a-targetpoint/2673220/1 "2025-11-09T14:18:47Z")

</div>

Hey, I’m trying to make my enemies look and shoot at my character’s head using SetFocus.  
Previously I just did SetFocus with the player character as the target, but that makes the enemies look at the center of the character (However besides that it worked just fine).

To make the focus the player’s head, I added a child actor with the child actor class as TargetPoint, and used that actor as the focus. Now the enemy focuses on the player’s head, but only on the XY axes, and just ignores the Z axis. Another thing to note is that when I print the actor location before setting it as the focus, the Z value does match that of the player.

(P.S. I know I can use setFocalPoint and update it on every tick, but I would really rather not)

What am I doing wrong? Thank you 🙂

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/5/b851fc089c26a8609647ef4f7953e9f3f4e1516b.png)

This is the function I use for setting the focus

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/5/7/55750f563513ebdc4a75fd3bf35df823b9f39999.jpeg)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/d/ead4951d3a8bced2013a2c5509519ad75c125a24.jpeg)

This is what happens when I set the TargetPoint as the focus

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/a/4/1a47ee8d3be2473abc7c3251aa3519dc25a773cf.jpeg)

This is what happens when I set the actor itself as the focus (yellow line is the focal point of the enemy)

---

<div class="post-metadata">

**Author:** ![BRGJuanCruzMK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/brgjuancruzmk/32/1036548_2.png) [@BRGJuanCruzMK](https://forums.unrealengine.com/u/BRGJuanCruzMK)\
**Post date:** [November 12, 2025, 3:37pm UTC](https://forums.unrealengine.com/t/setfocus-ignoring-z-axis-when-target-is-a-targetpoint/2673220/2 "2025-11-12T15:37:07Z")

</div>

Hey @WEASELS how are you?

Wha I think you want to do is to make the enemy’s weapon point at the player’s head and I assume you want the enemy to move only its upper body while doing that.

For that, I highly recomend you to follow this tutorial, which will help you to implement that feature!

![](https://d3kjluh73b9h9o.cloudfront.net/optimized/4X/c/8/1/c81c03b525f421f82bb98545b5b8a3e211d89170_2_690x388.jpeg)https://www.youtube.com/embed/hJQgFeICMKE?feature=oembed&wmode=opaque

You can mix your code with this tutorial to make the enemies look at player even on Z axis!

Hope this helps you!

---

<div class="post-metadata">

**Author:** ![WEASELS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WEASELS](https://forums.unrealengine.com/u/WEASELS)\
**Post date:** [November 15, 2025, 1:20pm UTC](https://forums.unrealengine.com/t/setfocus-ignoring-z-axis-when-target-is-a-targetpoint/2673220/3 "2025-11-15T13:20:26Z")

</div>

Hey, thank you - unfortunately the way in the video is done via event tick, and I’m trying to avoid that, so that does not work for me
