scale a value
How to make velocity take a value not only of 1 and 0 but also - 0.8 -0.7 - 0.6 and so on, without using getAxis ("Vertical"). That is, the value gradually decreases or grows
Sure... What I try to do is make the RigidBody2D of my object move in a staggered way, that is to say that it is not only 1 and 0 for example, but it also takes values that are between 1 and 0 and it is that I try to move an object from top to low and I realize that using getAxis ("Vertical"), velocity takes gradual values, that is to say that it increases or decreases gradually or stepwise, it does not go directly from 1 to 0, but it also takes values that are within that range , now I don't want to use getAxis ("Vertical") because at the moment of making the buttons move up and down to my object it is totally complicated for me so I try to make the movement as follows ...
Up = new Vector2 (0, movUp); (for example) rb.velocity = Up speed Time.fixedDeltaTime;
and to stop the movement when I stop pressing I just say that ... Up = new vector (0,0) Now the problem of all this is that using this, the velocity of the RigidBody2D does not take values that are within 1 and 0, for example, but only 1 or 0 and that makes my object stop at that same moment and my intention is that it stop the button a little slower at the time of solar so I wanted to know if there is a way to make the velocity take values between a range of 1 and 0 without using getAxis ... and that's all sorry if it was very long, A thousand apologies, I hope I have correctly explained my problem and thank you very much.
Your answer
Follow this Question
Related Questions
how can i anchor a point of a sprite to make it swing? 1 Answer
How Do I stop AI Following player on the Y-axis? 0 Answers
When i flip, the sprite moves 1 Answer
2D player enter/exit orbit 0 Answers
Player can only jump once!? 0 Answers