How to keep Axis value steady

Is there any way to keep axis Value of a key steady .I want to keep axis value of a key at its last value until its actually change. For example ; when i am using Mouse X to rotate pawn, Axis value get to 0 when mouse stops.

How can i keep it at last value until mouse starts to move again?

thanks.

Your question is leaving out some details… it really depends on what you are doing with the input.

Don’t focus so much on the input axis value. Look instead at your functions for those controls. There is no reason you couldnt set a float to remember the last input, and just ignore the input when it goes to 0.

I’m not 100% certain but I believe input functions are called every tick…so you need to tell it how to handle the 0’s.

Thanks for answers,
I’m making a space game and i asked this because when i use mouse axises for movement its stops after mouse stop.
For example ; when i use yaw to ship turn, i’m moving mouse start to end 5-6 times to get ship turn back.
Checking zero value isnt work for me either. Because i want to use zero value as well, but only when player gets his mouse to zero point And its not goes down directly to Zero, So even if i tell it how to handle the 0’s, its still do staff around <0.1 - highes value>
I hope i did explain myself :frowning:

:cry:

I just want to my pawn keep moving even mouse stops, anyway i will check this link.

Thanks for help

If you want more specific help, as in code suggestions, you really need to post a code snip of what you are doing to move the pawn, or a screenshot of the blueprint.

If your pawn is only moving when the mouse is moving, you are doing one of two things wrong (completely guessing here since I haven’t seen your code):

    • You are just moving the pawn directly inside of the input function, instead of storing it in a variable that continues to get applied every tick.
    • You may be using a variable to store that input, but you are not using any logic to ignore the input when it is zero.

Try this… where your mouse input logic is handled… assuming blueprint, do Branch[condition] (FMath::Abs(MouseInput)>.1) True -> change input, False -> [leave this branch node empty so no change from last frame]

Thanks a lot for help^^

Here is my setup :

BTW; i’m going to try what you suggested now, thanks again.