Lerp vs Slerp
• Lerp interpolates in a straight line
• useful for interpolating positions
• Slerp rotates around (0,0)
• useful for interpolating directions
#unitytipspic.twitter.com/KSQQWCb5f4
-
-
Yes, I realize he was doing a Vector3.Lerp in this case. But I find this topic a constant source of confusion. Even my Unity coders mix Lerp, Slerp, and MoveTowards all the time. I often see Update() { rot = Quaternion.Slerp(rot, targetRot, speed * Time.deltaTime); } .....
-
which "kindof" works so they don't see why it is wrong. But they meant RotateTowards in this case. Doesn't help that the interface names are easy to forget. I figure the more people reading about this topic from smart people that know how they should be used is great.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.