Problem with pins, scale, and tweening

0 favourites
  • 2 posts
From the Asset Store
Calculate parabolic trajectories and tween objects over them.
  • I'm trying to tween the scale of a compound sprite and it's giving me trouble.

    I have the sub-sprites pinned to image points on the main sprite, and for the most part it works fine. But when I change the scale of all the various parts, they also change location relative to one another. I can re-orient them after the fact, except that I'm tweening the change of scale. Which means that all the parts smoothly scale into the wrong places and then suddenly leap to the right places at the end.

    I've tried giving each part its own tween, but I'm also rotating the main sprite so trying to keep up with the destinations of all the various parts is nigh impossible.

    Does anyone have any thoughts on how to work around this?

    A simple illustration of the problem using LiteTween is attached.

    Thanks!

    [attachment=1:qjps06qs][/attachment:qjps06qs]

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well, I made a sort-of solution. I created an event group that repositions the sub-sprite to the main sprite's image point every tick. Then I turn it on at the beginning of the tween and off at the end of the tween. It's a total hack, but it works.

    Example attached.

    If anybody has any thoughts about a more elegant solution, I'd love to hear it!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)