Question: What is the lerp function and why would it produce a smoother rendering of motion in void FixedUpdate () { // Create a postion the
What is the lerp function and why would it produce a smoother rendering of motion in
void FixedUpdate () { // Create a postion the camera is aiming for based on the offset from the target. Vector3 targetCamPos = target.position + offset; // Smoothly interpolate between the camera's current position and it's target position. transform.position = Vector3.Lerp (transform.position, targetCamPos, Time.deltaTime); }
than with
void FixedUpdate () { // Create a postion the camera is aiming for based on the offset from the target. transform.position= target.position + offset;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
