# How to increase rotation speed?

Hello,

so i am trying to increase the rotation speed of my flying character via a timeline.
So i managed to set the rotation rate on key time down. Now it is spinning faster and faster when i hold the key down.
However there is still the problem that the movement stops when i release the button. That should not be. It should hold its impulse.
Looping doesnt make that better.
I need somehow to hold the value of the spinning rate once i release the button. HOw would i do that?
Any help appreciated.

You can’t use a timeline in this case. You need a variable which determines your speed and some logic which makes your character spin all the time by that value. If it’s 0 you can skip applying it but in general you need to hook your logic up to event tick.

Since you’re only changing the pitch you might as well just get the current pitch, add YourVariable to that and set it as your new rotation on event tick.

The higher YourVariable is the faster it will spin. Pressing can then just slightly increase it each tick and you have exactly what you wanted.

Cheers

That’s a possibility but you probably won’t need it. The rotation is constant. If you go too high it’ll look silly but since you modify it each tick that’s the best you will get. An interpolation will smoothen your movement between two points. You don’t have two points. You have constant movement.

But how do i get then the smooth rotation? Via Rinterp?

The problem is that the Get Input Key Time Down function gets a 0 value from the key input when i release the key
what makes all vector values also 0.
Is there a way to set the released pin to 1?

The problem is that the Get Input Key Time Down function gets a 0 value from the key input when i release the key
what makes all vector values also 0.
Is there a way to set the released pin to 1?

I got it working now. But i have another problem now.
I also want the plane to pitch around the opposite direction.
I created the same graph with other variables and a copy event tick. That does not work.
Here the working graph for one direction pitch.

You did it exactly the wrong way around.

The key needs to modify the rotation speed and nothing else and each tick you need to get the rotation, break the result, get the pitch, add your rotation modifier on top of that and the set that as your new rotation.

I also managed to move the plane the other way around.
It works very smoothly if i change directions. But, only at the beginning.
After i changed two times the pitch direction the movement starts to become stuttering when i press the button very shortly. A sudden 10 degree rotation
stutter rotation.
Why is that? Has that sth to do with the sequence node?
How could i fix that?
Here is the BP i managed to build.
Thank you for all. You lead me into the right direction.

EDIT: So i observed an interesting behaviour. The stuttering angle depends from how fast i rotated the plane before the direction change.
When i rotate the plane very fast the stuttering angle becomes bigger, if i change the direction at a slow speed the stuttering angle is small.
Where does this come from???