I have 2 gameobjects:
I control obj2 along the x axis manually. I want obj2’s y position to slowly match obj1’s y position. I can’t use Vector3 Lerp, as I control obj2’s x movement. I only want to lerp the y axis.
How do I do this?
obj2.transform.position = new Vector3 (obj2.transform.position.x + myManualInput, obj1.transform.position.y, 0);
This however, instantly jumps to obj1’s y position. I want it to move smoothly.