I’m trying to use Lerp in Translate but i can’t figure out a practical solution that may be too complex, here’s what i’m doing:
if (Input.GetAxis("Mouse ScrollWheel") > 0)
{
Camera.main.transform.Translate(_camZoomSpeed * Vector3.forward * Time.deltaTime);
}
else if (Input.GetAxis("Mouse ScrollWheel") < 0)
{
Camera.main.transform.Translate(_camZoomSpeed * Vector3.back * Time.deltaTime);
}
Nothing out of the ordinary.
However i want this process to be smooth and i can’t figure out an easy way to do this that uses local translation like transform.translate does. This does the movement i want, yet it does not feel smooth since i would need Lerp for that.
Is there any way to do this in a kind of simple way without messing the code too much? I think i’m missing something and i don’t know what.