Turning Back issue

Hi. I’m new to Unreal Engine 5, about 5 days. Experimenting with engine and First Person camera with Third person controller. I’m trying to do a Resident Evil 7 like character rotation, anticlockwise.
I’m having issue, for first time it works correctly, but after trying from different positions, it always rotates to the same position as seen in the video. Any help would be appreciated. Thanks!

Graph:

With timelines, you have to calculate the ‘from’ and ‘to’ before starting the timeline. You can’t sample during it, which will give you ‘strangeness’, as you are experiencing :slight_smile:

That’s the problem I don’t understand what’s wrong. I’m getting the controller yaw and subtracting -180. So it should always subtract from current rotation -180 but it always rotates to the same position. Without timeline it’s just abrupt rotation to the same position.

It’s two problems then. With UE, you can’t go past +/- 179 without the engine unpredictably swapping the sign on the rotation :thinking:

I kind of managed to fix the core issues, but got another one. When game starts, Alt is pressed it rotates correctly. When moving mouse in any direction, then pressing Alt again, it works correctly again. But if mouse isn’t moved after rotation and Alt is pressed, the Yaw value is 0 for some reason, and it just rotates to the default -179. And same is true when starting the game, or rotating and not moving mouse.

1 Like

You’re still sampling during the timeline :slight_smile:

See this

If you want to change yaw with a TL, something like this

Are you trying to do a 180 flip? ( If so, you need a bit more code… )

1 Like

Yes, that’s what I’m trying to achieve. To turn around player rapidly anti clockwise on button press.

Thanks for your help @ClockworkOcean. After modifying the blueprint a bit, it works correctly.

1 Like

Ok, if it works, that’s fine :smiley:

1 Like