Easing.back #76

raytsang opened this Issue Feb 21, 2012 · 6 comments


None yet
6 participants

I am using positionFromTo and easing.back
it seems not to be any 'back' effect occurs...


FrittenKeeZ commented Feb 21, 2012

I'm not sure I understand your problem.
If you want the animation to return to its original state you have to set UIAnimation.autoreverse = true;

For example, I want to move from (0,0) to (100,0) with easing.back.easeInOut
what I expected that it moves from (0,0) to (-10,0) first, and then it will move to (110,0), and finally back and stop at (100,0)

However, it just stop at (0,0) for a while and go to (100,0) and stop.


acron0 commented Mar 5, 2012

I'm seeing this too. Will investigate


prime31 commented May 17, 2012

this is due to the easing clamping values between 0 - 1. it will require a rewrite of all easing equations to not expect only 0 - 1 values.


tayl0r commented Oct 4, 2012

Why not convert it to use the GoKit easing functions instead? They behave as expected. The easing functions in UIToolkit are pretty limited. Bounce doesn't work properly either.

This is because of line 122 in UIAnimation.cs.

sprite.localPosition = Vector3.Lerp( start, target, easPos );

The value easPos, found via a call to your ease function, is not 0-1 in the cases of bounce and back eases. However, Lerp() clamps all values to 0-1. And that is why it doesn't work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment