hello
i dont normally need assistance with coding but this one is doing my head in.
all im trying to do is have a very simple third person camera with a smooth ‘lag’, simple right? apparently not.
LateUpdate()
// get a position behind the player
Vector3 wantedPosition = target.transform.position - (target.transform.forward * distance);
//move it up a bit
wantedPosition.y = target.position.y + height;
//lerp from current camera position to wanted position
transform.position = Vector3.Lerp(transform.position, wantedPosition, smooth);
the code above produces a smooth movement from the initial camera position to the ‘wanted position’.
but once the camera has reached that position it sticks to it like glue. no matter what the player is doing, how quickly it moves or rotates, the camera rigidly sticks to that position as if there is no lerp at all.
i have tried with various lerp type things, MoveTowards, SmoothDamp etc and they all produce the same result.
what am i missing?
thanks