So im trying to make a camera movement script for a simple RTS game im trying to make using vector3.lerp() but it doesn’t seem to be having any affect on my camera’s movement. the camera’s movement is still stiff. Is something wrong in this section of code?
if (Input.GetMouseButton(0))
{
float xinput = Input.GetAxisRaw("Mouse X");
float zinput = Input.GetAxisRaw("Mouse Y");
float x = trans.position.x;
float z = trans.position.z;
float y = trans.position.y;
Vector3 vec1 = trans.position;
Vector3 cam = trans.position = new Vector3(x + xinput, y, z + zinput);
trans.position = Vector3.Lerp(vec1, cam, 10);
}