- Home /
Question by
Ephoraaa · Dec 14, 2017 at 05:29 PM ·
movementcamera-movementtranslatetransform.translatedamping
How to stop transform.Translate instantly ?
Hi ! Is there a way to stop the motion instantly when I release the key after transform.Translate ? As it is now, it takes half a second to stop. I would like my camera movement to be really snappy, with no damping.
I tried without Time.deltaTime but it didn't change anything.
void Update () {
transform.Translate (Input.GetAxis ("Horizontal") * panSpeed * Time.deltaTime, 0, 0);
}
Comment
Best Answer
Answer by FortisVenaliter · Dec 14, 2017 at 06:07 PM
You need to change the Gravity and Sensitivity values in the Input Manager's record for the "Horizontal" axis. You might consider setting it up like button presses where it's more digital than analog.
Ah yes, I totally forgot about those options lol Thanks a lot !