Need help, (about scrolling

Get help using Construct 2

Post » Mon Jul 17, 2017 10:04 am

https://www.scirra.com/tutorials/560/swipe-based-smooth-scrolling-with-inertia

hy, I learn how to scroll using this tutorial (link), but i don't know what should i do or change if i scroll from the opposite...anyone can help this? for example, in that tutorial, if i touch the screen and scroll from up to down, then screen will go down right?...but what i want is the opposite which is I want scroll from down to up, not from up to down...

sorry for bad explanation or bad english... :oops:
B
7
S
2
Posts: 25
Reputation: 575

Post » Mon Jul 17, 2017 12:14 pm

Change

lerp(self.X,self.X+self.DiffX,0.35) to lerp(self.X,self.X-self.DiffX,0.35)
lerp(self.Y,self.Y+self.DiffY,0.35) to lerp(self.Y,self.Y-self.DiffY,0.35)

Be aware that the logic in this tutorial will scroll faster on a faster device.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to How do I....?

Who is online

Users browsing this forum: FabianB and 8 guests