# Trouble with directional Dodge

**URL:** <https://forums.unrealengine.com/t/trouble-with-directional-dodge/1196245>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [June 11, 2023, 9:54pm UTC](https://forums.unrealengine.com/t/trouble-with-directional-dodge/1196245 "2023-06-11T21:54:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alonzitto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alonzitto](https://forums.unrealengine.com/u/Alonzitto)\
**Post date:** [June 11, 2023, 9:54pm UTC](https://forums.unrealengine.com/t/trouble-with-directional-dodge/1196245/1 "2023-06-11T21:54:48Z")

</div>

Alright- this is probably such a stupid problem to have but I currently have a script that makes my character face an enemy in a lock on mode- and I have a dodge function.  
Whenever I press dodge however the character continues to face the enemy.

Even when I try disabling the look at rotation script and set the actor rotation.

The script works but it doesn’t turn the player fast enough- I’ve tried setting a delay of .1 and a wait until next tick however it is not always 100% consistent and I need the player to be able to dodge quickly.

8/10 times he will roll in the direction he’s moving and then 2/10 times he will roll straight into the enemy without turning

---

<div class="post-metadata">

**Author:** ![CobaltTS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CobaltTS](https://forums.unrealengine.com/u/CobaltTS)\
**Post date:** [June 12, 2023, 12:31am UTC](https://forums.unrealengine.com/t/trouble-with-directional-dodge/1196245/2 "2023-06-12T00:31:43Z")

</div>

Can you send screenshots of your look code, specifically how you’re stopping it?

---

<div class="post-metadata">

**Author:** ![Alonzitto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alonzitto](https://forums.unrealengine.com/u/Alonzitto)\
**Post date:** [June 12, 2023, 2:13am UTC](https://forums.unrealengine.com/t/trouble-with-directional-dodge/1196245/3 "2023-06-12T02:13:20Z")

</div>

Yes- thank you

The code is messy since I’ve tried so many different attempts

but here it is

The first is showing the mechanism controlling the player rotation and how I attempted to disable it with an if branch (if dodging= dont change rotation)

and the second screenshot shows the dodging

 ![Screenshot 2023-06-11 at 7.11.54 PM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/d/7/5d7121a4809bf06ab08dd561db4f44bf3a39a492.png)  
 ![Screenshot 2023-06-11 at 7.12.30 PM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/7/f/f7f16de3f5b4b1551acc3f01faefb344098a6f90.jpeg)

 ![Screenshot 2023-06-11 at 7.13.11 PM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/f/acfb1c82740b8c7f34f9b7beb4fe3d27aaf3bc81.jpeg)

---

<div class="post-metadata">

**Author:** ![Alonzitto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alonzitto](https://forums.unrealengine.com/u/Alonzitto)\
**Post date:** [June 12, 2023, 2:17am UTC](https://forums.unrealengine.com/t/trouble-with-directional-dodge/1196245/4 "2023-06-12T02:17:20Z")

</div>

Also what’s the best method to make the character face the direction pressed on the control stick immediately ?

Mine is a little messy using the RInterp Method

---

<div class="post-metadata">

**Author:** ![CobaltTS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CobaltTS](https://forums.unrealengine.com/u/CobaltTS)\
**Post date:** [June 12, 2023, 3:16am UTC](https://forums.unrealengine.com/t/trouble-with-directional-dodge/1196245/5 "2023-06-12T03:16:00Z")

</div>

Oh are you using controller input

Honestly, you might find your solution just in the process of straightening that out… Please rearrange it and send a new ss

---

<div class="post-metadata">

**Author:** ![illspiritx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illspiritx](https://forums.unrealengine.com/u/illspiritx)\
**Post date:** [June 12, 2023, 3:31am UTC](https://forums.unrealengine.com/t/trouble-with-directional-dodge/1196245/6 "2023-06-12T03:31:41Z")

</div>

Yea, kinda hard to make out what’s wrong from the pics.

But since you seem to be using only one direction of animation, instead of manually fiddling with directions, you could turn on orient rotation to movement when you start dodge, then set it back when finished.
