Closed oxysoft closed 8 years ago
I'm pretty sure I can't add static methods to existing unity classes, but adding those to MathHelper/UnityHelper sounds good to me.
Oh right good point, didn't think of that. What you could do is make it an instance method then
follower.position = follower.position.EasedLerp(mousePositionWorld, 0.75f);
I wanted to stay as close to the existing lerp notation as possible.
Added:
Add extension methods to Vector3 for EasedLerpFactor so that we can do
instead of
The same should be done for Vector2, and it would be handy too to add a EasedLerp method to MathHelper to perform the same lerping operation for single numbers.
e.g.