Issue With Screen Scrolling Implementation =(

0 favourites
  • 1 posts
From the Asset Store
Is a circular loading screen with code ready to use. No Animation.
  • I've been playing around with the code from this tutorial, originally designed for C2 though. It's for a touch-based screen scroll, but I'd like to invert the scroll direction (by default it doesn't follow common touch scrolling logic of swiping down to scroll up, you have to swipe up to scroll up). The author has posted a brief instruction for allegedly achieving this but... I don't understand the instruction, and every edit I've tried so far hasn't worked.

    Here's the author's screenshot of the event sheet:

    construct-static.com/images/v951/uploads/articleuploadobject/0/images/14203/swipeevents.png

    The closest I got to figuring this out was changing the action:

    TouchFollowMe ] Set X to lerp(Self.X,Self.X+Self.DiffX,0.35)

    to:

    TouchFollowMe ] Set X to lerp(Self.X,Self.X-Self.DiffX,0.35)

    (basically just changed the + to a - in the lerp function, and did this for the Y axis code too).

    That change sort of works, but also leads to a weird rubber-banding issue where the camera sprite (TouchFollowMe) tries dragging itself back to the original touch location after swiping. And I can't figure out what's causing that rubber banding.

    Thanks for reading, and I hope my explanation isn't too confusing XD

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)