UMG Media Gallery

I’ve never used any swipe functionality in UE4, not sure what kind of data it returns but when you say it snaps back like a magnet it’s most likely caused by the Tick event trying to set the position of the *Scrollbox *to the requested value. In this very case, your touch movement should be setting the ScrollOffset variable rather than the position of the *Scrollbox *and you should let the Tick event handle the actual movement. This way no matter how fast/hard one swipes, only one item can be swiped at a time. (althought the offset would most likely stack up which might end up looking convincingly responsive)

If you want the scrollable item to follow the finger independently as the user navigates within the boundaries of the Scrollbox, additional tweaks will be needed. You could disable (gate off) the Tick for the duration of the swipe and only reactivated it once the touch is finished, and only then let the Tick take over and slide the button to the final resting position.

To sum it up, for the most natural feel, I think you’d want to implement 2 separate behaviours when interacting with this widget:

Scrolling with the buttons: * (already working as intended)*

  • when a button is clicked the scrollbox offset is increased/decreased by a certain amount
  • Tick will handle the sliding trying to reach the desired position using a curve

Swiping:

  • disable Tick onTouchStarted so the user can control the Scrollbox position directly
  • touch location sets the Scrollbox offset directly
  • on TouchEnded, set the ScrollOffset variable to the desired final resting position (left or right of the current touch position, whatever is closer to the centre of the scrollbox)
  • enable Tick and let it handle the rest of the sliding

This is untested. If someone comes here and corrects me, listen to them.