how can I change the layout scale smoothly overtime?
Say, when a player presses a button, than to increase the layout scale ("zoom-in") by X over 5 seconds?
Thanks!
Develop games in your browser. Powerful, performant & highly capable.
Add Tween behavior to any object. Run a value tween from 1 to the target scale. And add this event:
Obj is Tween "tag" running: Layout set scale to Obj.Tween.value("tag")
Amazing as always - thanks!
dop2000
and just as an elaboration on that, how can I make the zoom focus on a specific point on the layout?
Thanks
You scroll there.
Can you explain more about it, I can't find a place to scroll
Use a sprite with ScollTo behavior. Or add this event:
On every tick: System Scroll to
Use a sprite with ScollTo behavior. Or add this event: On every tick: System Scroll to
I created 1 sprite and set the tween value between 1 and 0.95. Layout scale works but scrolls to not, layout always scales in position (0.0)
Is layout big enough to scroll? Try enabling "unbounded scrolling" in layout properties.
Oh, thank you very much! When unbounded scrolling was enabled, it worked perfectly.