// Example of Lerp for moving an objectVector3 startPosition =newVector3(0,0,0);Vector3 endPosition =newVector3(5,0,0);float t =0.5f;// 50% of the wayVector3 interpolatedPosition = Vector3.Lerp(startPosition, endPosition, t);
// Example of Slerp for turning a spaceshipQuaternion startRotation = Quaternion.identity;Quaternion endRotation = Quaternion.Euler(0,90,0);float t =0.5f;// 50% of the wayQuaternion interpolatedRotation = Quaternion.Slerp(startRotation, endRotation, t);