Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Does anyone know what the best method is to scroll the screen along by its own width, using acceleration and deceleration?
I've tried lerp but that only produces the effect of deceleration, of course.
What I use is a small invisible sprite (10x10) called 'scroller'.
Add Scroll-to and Tween behaviors to it.
Then, whenever you need to scroll, use Tween to that sprite with Ease (e.g. In Out Quadratic).
On touch start -> set variable acc to 6
Is in touch -> scroll to lerp (scrollx, touch.x,acc*dt)
-> set acc to lerp(acc,1,mydecelerationspeed*dt)
Develop games in your browser. Powerful, performant & highly capable.
Worked a treat, thanks so much El Constructorr!
And thanks for helping too newt :)