I am trying to update my current Camera Movement script, to allow smoother movements.
//On normal speed
if(tempDirection != Vector3.zero && Time.timeScale == 1)
{
tempDirection = transform.TransformDirection(tempDirection);
tempDirection.y = 0;
tempDirection = tempDirection.normalized * cameraSpeed * Time.deltaTime;
transform.Translate(tempDirection, Space.World);
}
I have replaced line 6 with Vector3.SmoothDamp, but the results are really clunky and I’m not entirely sure why.
transform.position = Vector3.SmoothDamp(transform.position, tempDirection, ref velocity, 1f);
Any suggestion on a better form of smoothing this movement would be appricated. Thanks.