Weird error message after tweening alpha on PC device simulator.

I’m using the tweening (transition.to) to fade in and out some objects in my game, when running this game on the android simulator (on a PC) I’m getting this error message:

WARNING: Attempt to set object.alpha to 1 which is outside valid range. It will be clamped to the range [0,1]

now… I don’t need to tell you that setting an object alpha to 1 should not generate this problem, at some rare cases, the error reads:

WARNING: Attempt to set object.alpha to 1.0001 which is outside valid range. It will be clamped to the range [0,1]

Which makes more sense, but still, should not happen if I use the transition.to to transition my objects alpha to 1, but it’s still alright if the SDK calculates and goes a little overboard, but should no appear when transitioning to 1.

The same part of the game, when run on the simulator on a Mac does not generate this error.

Yuval.

Hi Yuval,

Can you provide a build # and basic code? Is this a simple transition with no onComplete or anything added in?

Brent

I get that in my game as well, and i’m not even using the regular transition class for my animations.

I think the problem lies in the easing equations. Easings like “easeOutBack” and “easeOutElastic” will obviously generate higher values than the target value. But even other easinig curves may at some occations generate a slightly higher value. 

the easeOutExpo looks like this:

c \* 1.001 \* (-pow(2, -10 \* t/d) + 1) + b

The numbers will get slightly higher if the last calculation value is very close to the target value. Just runned the code and got this value:  

1 \* 1.001 \* (-pow(2, -10 \* 0.999/1) + 1) + 0  = 1.0000156616156182

Hi Yuval,

Can you provide a build # and basic code? Is this a simple transition with no onComplete or anything added in?

Brent

I get that in my game as well, and i’m not even using the regular transition class for my animations.

I think the problem lies in the easing equations. Easings like “easeOutBack” and “easeOutElastic” will obviously generate higher values than the target value. But even other easinig curves may at some occations generate a slightly higher value. 

the easeOutExpo looks like this:

c \* 1.001 \* (-pow(2, -10 \* t/d) + 1) + b

The numbers will get slightly higher if the last calculation value is very close to the target value. Just runned the code and got this value:  

1 \* 1.001 \* (-pow(2, -10 \* 0.999/1) + 1) + 0  = 1.0000156616156182