Hi all,
I'm trying to create a camera that eases in, then eases out using the scroll actions.
Does anyone have an idea how this could be implemented relatively simply?
Thanks!
I've been using Yann's technique in this thread for similar stuff: scirra.com/forum/smooth-zooming-and-more_topic49004_post308296.html
Develop games in your browser. Powerful, performant & highly capable.
Thanks — Perhaps I should have been more clear, I meant easing in and out along the x and y axis, not zooming in/out.
Another Yann example I've been using for something similar: scirra.com/forum/clickdrag-to-pan-camera_topic45640.html
:)
Something like lerp(screenPositionX, screenTargetX, dt) should work too. Or did I misunderstand, you wish to smoothly scroll the screen from X,Y to another X,Y?
Yeah I'm using lerp at the moment, but I want to ease in, and then ease out. Lerp just eases out. Thanks for the input though!
If custom plugins are an option, EaseTween has easeIn/Out function. If not, perhaps some unholy custom combination of lerp/unlerp would work?