Scroll with Inertia issue (touch controls)

0 favourites
  • 5 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Hi all,

    I've been following https://www.scirra.com/tutorials/560/sw ... th-inertia to set up a simple "scroll controls" test but have run into the following issue:

    When following the instructions it works perfectly, that is, until I try and reverse the Direction of movement ("Direction: By adding or subtracting ‘self.DiffX’ to ‘self.X’ (and self.DiffY to self.Y), you can change the direction of the scroll depending on your game needs."). When I've inverted the addition to subtraction I get a strange bug every few swipes where the DiffX and DiffY values are clearly wrong and the scroll goes bouncing back towards (sometimes beyond) the origin of the swipe instead of away from it.

    It's quite hard to explain. Please see the .CAPROJ file below:

    https://ufile.io/s4e14

    To recreate the issue:

    • Load the Caproj and Start the project
    • Use a touch screen to swipe left, right, up and down
    • Eventually you will be "rebounded" back in the direction of the origin of the touch (infrequent)

    Thankyou,

    Greg

  • Bump! Please help!

  • Probably best to post a .capx showing the problem, as it allows those who can help a quick way to both understand and (hopefully) rectify the issue - especially as you note that your problem is "quite hard to explain".

    Be aware that the time users have to help may be limited (due to work, life etc) so asking them to go through a tutorial to understand your problem may be a little too much.

  • Probably best to post a .capx showing the problem, as it allows those who can help a quick way to both understand and (hopefully) rectify the issue - especially as you note that your problem is "quite hard to explain".

    Be aware that the time users have to help may be limited (due to work, life etc) so asking them to go through a tutorial to understand your problem may be a little too much.

    You are quite right. I've posted a .capx project file above for anyone who has some time to help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I had this issue as well.

    I solved it by simply using replacing the touch.x or touch.Y on the events to Touch.Absolute.

    Try it and post your result

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)