How I do I make controls/elements move with inertia?
Posted
by Kris Erickson
on Stack Overflow
See other posts from Stack Overflow
or by Kris Erickson
Published on 2008-10-12T21:52:49Z
Indexed on
2010/04/25
5:13 UTC
Read the original article
Hit count: 312
Modern UI's are starting to give their UI elments nice inertia when moving. Tabs slide in, page transitions, even some listboxes and scroll elments have nice inertia to them (the iphone for example). What is the best algorythm for this? It is more than just gravity as they speed up, and then slow down as they fall into place. I have tried various formulae's for speeding up to a maximum (terminal) velocity and then slowing down but nothing I have tried "feels" right. It always feels a little bit off. Is there a standard for this, or is it just a matter of playing with various numbers until it looks/feels right?
© Stack Overflow or respective owner