|
Is there an easy way to smoothen my 2D Vector? Currently, only Vector3.Lerp works...
(comments are locked)
|
|
Sure. In essence, a "Lerp" is nothing more than:
In Unity, the Lerp functions also clamp 't', ensuring the range doesn't go below zero, or above one. So to implement a "Lerp" function for Vector2's yourself, it can just be a 2-line function:
Although it does seem like a bit of an oversight that it wasn't included in the Vector2 class. I must agree with Unity's oversight... Oh well, Thanks a lot!
Jan 26 '10 at 11:15 AM
Adriaan
(comments are locked)
|
|
For the record, Vector2.Lerp does exist in Unity 3.
(comments are locked)
|
