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:
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)