Author Topic: UIDragPanel and SpringDampen (How to stop on a specific point after a swipe)  (Read 1431 times)

dillrye

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 30
    • View Profile
Hello, I am trying to make my list of items on a drag panel stop/center on an item depending on how fast someone flicked the scroll-able area.

I am wondering if there is a way for me to calculate how far the panel will scroll when someone releases a touch(so i could then modify the momentum to stop on the correct position).  I have been looking at the spring dampen code, but I am rusty on my spring physics and I am unsure on how to calculate this.  Has anyone else come up with a solution they would be willing to share?

Thank you,
Dylan