How to ease the player controller rotation speed

We are creating a training program that will be played by people of all ages and levels of computer skill. The game takes place in a first person perspective which some people have a lot of trouble learning how to play. Due to this we intend on making it as easy as possible to control the player pawn and have decided only to use the arrow keys as movement input. This eliminates pitch and roll, keeping only forward and backwards movement with the up and down arrow keys as well as yaw controlled by the left and right arrow keys. The issue we are finding is that the default first person character blueprint is set up such that rotating the player pawn happens in a “start-stop” fashion where upon pushing the left or right arrow key, the pawn rotates instantly at a set speed and then upon releasing the key the pawn stops rotating immediately. People seem to have trouble with this as it happens too quickly thus we need a way to “ease” into the rotation speed. In other words we need to be able to tap the arrow key and have the pawn barely rotate, but if you hold the arrow key the pawn will gradually (over the course of about 0.5-1 seconds) reach its max rotation speed until the key is released in which the pawn will stop rotating. Thus we need a way to set this up, even it it means manually setting a player rotation instead of using the defaults. I am aware that there is an “ease” function but I have no idea if its usable in this case or how to even set it up if it is usable.

Any help would be much appreciated

There are several ways you could do this, one of which is through the Ease function. There is also Lerp, and FInterp, each which have slight variations in how they work or how they ease, and all that comes down to personal preference for your use case. So I’m going to show you FInterp.

Essentially, you’ll want to set your rotation speed each tick that the player is holding down a key to turn. Whenever the player lets go of the key, you can reset to 0 or ease back down, your choice. Set up a Max Rotation Speed variable as the target. Delta Time you get from the Tick Function. Play around with Interp Speed to find a value that speeds up correctly; I’d start with an InterpSpeed of 5 and go up or down from there.

1 Like

Perfect! Thanks dachora1 I got it working exactly how I wanted it. For anybody else who is interested, the pic below is what I went with and then just calling the event every tick in the first person character blueprint. An InterpSpeed of 5 was wayyy to high it was just noticeable at 0.01 and so I actually went with 0.003.