Trouble with directional Dodge

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

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

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


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

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

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.

1 Like