[DEMO] Momentum/Inertia Scroll with Grid Snap

netdzynrnetdzynr Member Posts: 296
edited November -1 in Working with GS (Mac)
For folks looking for a way to do momentum scrolling (sometimes called inertia scrolling or weighted scrolling), I posted a game project that demonstrates one method of doing this. Momentum scrolling occurs when you drag a set of items in a direction and the set gradually slows to a stop (like most lists on the iPhone/iPod Touch). This project has a bunch of hard coded attributes and is not easily customized, but is available to take apart for anyone who is feeling brave. I hope to make a more easily used version at some point with attributes that are more "fill-in-the-blank" but it's a fairly complex routine.

Unfortunately, the project is iPad sized and Creator won't let me publish it to the GS site, so you'll have to download it from here.

Feel free to use wherever.

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    Thanx...netdzynr!

    going to take a look/see!

    MH
  • JackBQuickJackBQuick Member Posts: 524
    Works great, netdzyner! I don't have the time now but I'm going to set it aside to study your technique at a later date -- I like how smooth it runs.
  • quantumsheepquantumsheep Member Posts: 8,188
    Very nice. I gave this a quick go last night.

    One problem I found was that it didn't work on an actual device. I'm sure there's a good reason.

    I mean, it starts up, the balls appear, but nothing actually works :(

    QS
  • netdzynrnetdzynr Member Posts: 296
    @QS - You tried it on an iPad?
  • quantumsheepquantumsheep Member Posts: 8,188
    netdzynr said:
    @QS - You tried it on an iPad?

    Actually, no! On a 3GS.

    Is it iPad only? If so, I must have missed that, but it displays fine - just won't move!

    QS :D
Sign In or Register to comment.