3
\$\begingroup\$

Unity has a Slerp method:

public static Vector3 Slerp(Vector3 a, Vector3 b, float t);

Where it returns an interpolated position between a and b by the percentage of t. So if t = 0.5, and a = Vector3.zero, and b = Vector3.one, it returns a Vector3 of (0.5, 0.5, 0.5).

But what does SlerpUnclamped do?

public static Vector3 SlerpUnclamped(Vector3 a, Vector3 b, float t);

t is not clamped between 0 and 1. So what what is t relative to? How do you use this method?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Unclamped would mean that you can get points on the spherical interpolation curve that lie beyond the initial vectors. (After all the SLERP curve is defined by a mathematical function). So a t value > 1 would mean a point on the curve that lies beyond vector b \$\endgroup\$ Jan 14 '17 at 22:27
2
\$\begingroup\$

Unclamped would mean that you can get points on the spherical interpolation curve that lie beyond the initial vectors. (After all the SLERP curve is defined by a mathematical function). So a t value > 1 would mean a point on the curve that lies beyond vector b

Thanks @UnholySheep for the answer!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.