Trying to throw the ball at the same rate as drag and drop..any help would be appreciated.
on start of drag, store, x,y and tick start
on release, compare the x,y to current touch x,y and ticks passed
This gets you the: angle, distance and ticks passed during movement
These variables should be enough to determine a speed for the ball.
Another solution would be to story previous X and Y as instance variables, and then on release, you use the difference between previous xy and current xy to get your Velocity. This and dt gets you the speed AT the moment of release. Theres also a couple different ways to average over the last few frames before release.
Develop games in your browser. Powerful, performant & highly capable.
on start of drag, store, x,y and tick start on release, compare the x,y to current touch x,y and ticks passed This gets you the: angle, distance and ticks passed during movement These variables should be enough to determine a speed for the ball.
Thanks..I appreciate it!