Answer the question
In order to leave comments, you need to log in
Smooth wheel turning with mobile control or axis simulation Input.GetAxis("Horizontal"). How is it better?
Steering wheel control by pressing the "left" & "right" buttons. When pressed, I set bool left/right to true and when decompressed, to false , respectively. I need that when the turn button is pressed, the wheel turns smoothly and when unclenched, respectively, smoothly rises to position 0.
How I implemented it now
if (left && horizontal > -1)
horizontal -= 0.1f;
else if (!left && horizontal < -0.1f)
horizontal += 0.1f;
if (right && horizontal < 1)
horizontal += 0.1f;
else if (!right && horizontal > 0.1f)
horizontal -= 0.1f;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question