# Turret won't turn towards me and just goes the opposite direction

**URL:** <https://forums.unrealengine.com/t/turret-wont-turn-towards-me-and-just-goes-the-opposite-direction/1812141>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [April 20, 2024, 6:10am UTC](https://forums.unrealengine.com/t/turret-wont-turn-towards-me-and-just-goes-the-opposite-direction/1812141 "2024-04-20T06:10:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JonathanHaile](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JonathanHaile](https://forums.unrealengine.com/u/JonathanHaile)\
**Post date:** [April 20, 2024, 6:10am UTC](https://forums.unrealengine.com/t/turret-wont-turn-towards-me-and-just-goes-the-opposite-direction/1812141/1 "2024-04-20T06:10:12Z")

</div>

![Screenshot 2024-04-20 010522](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/3/5e33ad58c8af2664509ebbc841f8db51d16964f0.png)  
 ![Screenshot 2024-04-20 010638](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/c/1/bc1296e0a86b33b86eb8f3e484f60ad40247c775.jpeg)

Here’s my blue print and how I have my character set up, I have the bullet spawn at the tip of the barrel but since my turret also turns away from the player it looks weird and doesn’t properly hit the player.

Not sure what I am doing wrong, please let me know if you need more info!

---

<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:** [April 20, 2024, 7:09am UTC](https://forums.unrealengine.com/t/turret-wont-turn-towards-me-and-just-goes-the-opposite-direction/1812141/2 "2024-04-20T07:09:23Z")

</div>

- have a look any any tutorial to see how `rInterpTo` works - its needs to be run during Tick in order to receive frequent updates. That’d explain the weirdness.
- you also seem to rotate both the mesh and the actor - that’d explain the incorrect direction.

---

<div class="post-metadata">

**Author:** ![JonathanHaile](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JonathanHaile](https://forums.unrealengine.com/u/JonathanHaile)\
**Post date:** [April 20, 2024, 8:08am UTC](https://forums.unrealengine.com/t/turret-wont-turn-towards-me-and-just-goes-the-opposite-direction/1812141/3 "2024-04-20T08:08:09Z")

</div>

Here is a video

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/c/7/5c7574faaccb1f2ef079e75a1a6c325248abf35e.jpeg "Turret Issue") ](https://www.youtube.com/watch?v=c1yPZTSXdZs)

---

<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:** [April 20, 2024, 8:16am UTC](https://forums.unrealengine.com/t/turret-wont-turn-towards-me-and-just-goes-the-opposite-direction/1812141/4 "2024-04-20T08:16:23Z")

</div>

The video does not help. You asked:

> Not sure what I am doing wrong

The script is simply incorrect. Explained in the previous post. At **the most fundamental level** , you’d want something along the lines of:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/a/6/5a6271081d86d39f474ed222e58b78a44c4840f2.png)

* * *

Or opt for any of the bazillion [turret tuts](https://www.youtube.com/results?search_query=ue5+turret) on YT.

* * *

Or have a look at this turret:

> [@Restrict Pawn's Rotation](https://forums.unrealengine.com/t/restrict-pawns-rotation/487856/3):
>
> Have a look at this one: Script to copy: [[Image from Gyazo]](https://gyazo.com/07facc8d174c94dd6103a641878c6929) Essentially, Dot Product is an answer to most angular issues. The yellow arrow indicates the turret’s front. Oh, and a TL is probably not the way to go about it unless you’re after something truly specific / unique / inflexible. Does not mesh well with target tracking in my head.

There’s even script there to copy.

---

<div class="post-metadata">

**Author:** ![JonathanHaile](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JonathanHaile](https://forums.unrealengine.com/u/JonathanHaile)\
**Post date:** [April 20, 2024, 5:34pm UTC](https://forums.unrealengine.com/t/turret-wont-turn-towards-me-and-just-goes-the-opposite-direction/1812141/5 "2024-04-20T17:34:16Z")

</div>

Oh okay thank you!!!

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [May 20, 2024, 5:35pm UTC](https://forums.unrealengine.com/t/turret-wont-turn-towards-me-and-just-goes-the-opposite-direction/1812141/6 "2024-05-20T17:35:11Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
