RSS

Forum | Bug in LERP animator

January 4th, 2010 • Uncategorized
You must be logged in to post Login Register

Search Forums:


 






Bug in LERP animator

No Tags
UserPost

7:21 pm
April 23, 2010


thaaks

Germany

Member

posts 97

I wanted to have my title image shrink and grow (now that centering it's position using the script file is working Wink).
To do that I created a LERP animator within the code (similar to your example Intro class).
I wanted to start with the full size image and shrink down to half the size and then grow again and so on.
It seems that the animator created like this

anim = Animator.CreateLERP(1.0, -0.6, 0.5, True, False)

does not work but the animator created like this

anim = Animator.CreateLERP(0.5, 0.6, 1.0, True, False)

does work.
I think there's a problem with the animator starting with negative speed values…

The effect I get with the "negative" animator is that the value toggles between max and min value on every update.

So I guess there's a bug in the callback function script_LinearInterpolate for the LERP animator in the "else" part of

If ( a.current_data[1] > 0 )

This line

a.current_data[2] = a._init_data[2]

looks supsicious to me. Furthermore the else part in general is shorter and seems to miss one or more conditions from the if part above.

Maybe you, Matt, have a look?

Cheers,
Thomas

7:24 pm
April 23, 2010


thaaks

Germany

Member

posts 97

Damned, I can't edit my post - the forum throws some fatal exception. I bet it's the code blocks…

Anyway, I forgot to mention that this toggle effect of the negative animator occurs when the animator want to revert direction. So it's starting good but as soon as it's time to change direction it falls into flipflop mode.

No Tags

About the Matt Bennett: CAD & Code forum

Most Users Ever Online:

11


Currently Online:

4 Guests

Forum Stats:

Groups: 4

Forums: 7

Topics: 58

Posts: 265

Membership:

There are 225 Members

There has been 1 Guest

There is 1 Admin

There are 0 Moderators

Top Posters:

thaaks - 97

Amiga Man - 53

Dabz - 5

niek - 4

semar - 2

Administrators: matibee (104 Posts)