- #1
BeanAnimal
- 4
- 0
Long story short...
I am having a hard time creating natural deceleration for a VB.NET touchscreen project. I would like to be able to scroll an object and allow it to coast to a stop.
The starting velocity will be set by the swipe speed of the finger. Let's call it pixels/millisecond. That leaves me with a DISTANCE and TIME to 0 velocity as unknowns.
My Choices (at least as I see it).
a) Choose a fixed stopping distance (maybe based on the length of the initial swipe) and then calculate the time needed to reach 0 velocity.
-or-
b) Choose a fixed time to reach a 0 velocity and calculate the distance the object will decelerate over. ( I don't like this option at all)..
-or-
c) Give the object a mass and friction, then calculate both the time and distance to reach 0 velocity. (appealing because both mass and friction could be adjustable, even set based on the length and speed of the initial finger swipe. I.E. short swipe = higher friction, longer swipe = lower friction).
I am having trouble applying (and/or understanding) the proper kinametics or inertial formula.
Here is a "Microsoft Touch" information page would be the ideal model for what I am trying to recreate. This MS Touch functionality is not available on the platform I am developing for (not to mention that I would really like to learn how to figure this out on my own the next time).
Thanks in advance,
Bill
I am having a hard time creating natural deceleration for a VB.NET touchscreen project. I would like to be able to scroll an object and allow it to coast to a stop.
The starting velocity will be set by the swipe speed of the finger. Let's call it pixels/millisecond. That leaves me with a DISTANCE and TIME to 0 velocity as unknowns.
My Choices (at least as I see it).
a) Choose a fixed stopping distance (maybe based on the length of the initial swipe) and then calculate the time needed to reach 0 velocity.
-or-
b) Choose a fixed time to reach a 0 velocity and calculate the distance the object will decelerate over. ( I don't like this option at all)..
-or-
c) Give the object a mass and friction, then calculate both the time and distance to reach 0 velocity. (appealing because both mass and friction could be adjustable, even set based on the length and speed of the initial finger swipe. I.E. short swipe = higher friction, longer swipe = lower friction).
I am having trouble applying (and/or understanding) the proper kinametics or inertial formula.
Here is a "Microsoft Touch" information page would be the ideal model for what I am trying to recreate. This MS Touch functionality is not available on the platform I am developing for (not to mention that I would really like to learn how to figure this out on my own the next time).
Thanks in advance,
Bill
Last edited: