I got few things that I've been wondering lately.
I have row of cards and I wanted to implement a smooth zoom effect for them, the kind that when you hover your mouse over a card it scales that card up a bit.
That's not really a problem, it wasn't hard to implement. The problem is that card is actually a composition of 3 objects (base, image and text). The image and text are pinned with pin behavior to certain image points in the card base.
Now due this I have to unpin them (pinned objects don't seem to move with scaling), scale them separately and set their position every tick card is scaled.
All of this seems a bit wasteful and overly complex. So here are few questions:
Scale vs setsize, which should I use or is there any difference?
Text scaling, is there a decent way to scale text up? Setsize for text object seems to enlarge the area but not the text itself.
And more general question about performance: does this kind of scaling that is called every tick give any performance problems? I've tried avoid doing things every tick as much as possible by setting 'run each 0.5 seconds' sort of conditions on events that don't necessarily need that real-time response. Is there really much difference doing run "every tick" vs "every 0.1 seconds"?
EDIT: Bonus question! I am planning to add a 'pushback' effect as well. when card being scaled overlaps another card next to it, that card should be pushed away so that two cards don't overlap in any situation. The 'is overlapping' just does not seem to work in this case, should it work as a trigger (when card is overlapping a card)or am I doing something wrong again? :)