Hi, so I’ve been using lerp for the first time and I’m a bit confused. Here’s my code;
if (Input.GetAxis("Mouse Y") > .1f & disableMotion == 0)
{
cameraobj.transform.localPosition = new Vector3(.9f, Mathf.Lerp(4, 7, Time.deltaTime), -4.5f);
}
I plan on modifying the rotation of X later, but I wanted to figure out what I’m doing first. This code is being run within Void Update of course. Am I using the wrong kind of Lerp?
The result is an instantaneous .5f jump in my Y Axis and then it just stops. I think it’s probably because I’m using = new Vector3, but I have to run to work now unfortunately and the scripting reference told me to use = new Vector3. Thanks for the help guys.