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.
Develop games in your browser. Powerful, performant & highly capable.
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.
If anybody has any thoughts about a more elegant solution, I'd love to hear it!