I’m trying to make a mobile game where the user interface is driven by swipes rather than virtual joysticks, similar to Temple Run.
I’ve been able to detect the direction of a swipe by comparing the 2D Vectors of the start and end of a touch event. However, I now need this to result in the third person character turning 90 degrees. I’m trying to do this with a timeline, so that I can control the smoothness of the turn.
Here is the node setup:
The timeline looks like this:
The problem is that because I’m using the “Add Yaw Input” this depends on the FPS. It works on my desktop where I have 120 FPS, but not on my phone because that is running on 60 FPS.
How do I make this independent of the FPS?
I tried using the Character->Set Actor Rotation with a timeline that goes from 0 to 90 degrees, but at the end of the timeline the character switches back to the original rotation. Here’s the blueprint for that.
So what am I doing wrong?