Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tween intersection #2

Open
saschagehlich opened this issue Jul 18, 2013 · 1 comment
Open

Tween intersection #2

saschagehlich opened this issue Jul 18, 2013 · 1 comment

Comments

@saschagehlich
Copy link

Hey,

I am running into a pretty weird problem: I have two TweenAccessors that handle totally different classes and that live inside two different classes as well. But when I create tweens for both accessors at the same time, it happens that the values seem to intersect.

My specific example looks like this (I'm working with LibGDX):

  • My AnswersSelection actor has 4 sprites that are being modified by a SpriteAccessor. It scales the buttons up (to 1.f) on .show() and fades them out on .hide(). This works fine.
  • My QuestionTitle actor has a PositionOffsetAccessor (with x,y values) which modifies a custom PositionOffset object. The actor creates a new tween that animates the PositionOffset to (0,0) on .show and animates the offset to (0, 150) on .hide().

Now, if I animate both Accessors at the same time, it looks like they are intersecting. One of the buttons suddenly has a default scaleY of 150.f and scales down to 1.f which totally distorts everything.

I hope you get what I'm trying to explain and I hope you can help me.

@saschagehlich
Copy link
Author

Okay - found the issue. I was initally resetting the values by doing .set().target(0), but the second value was missing, so it somehow mixed it up with another Tween. Maybe it should throw an error if there are not enough values given?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant