Dragging Objects and Acceleration

Hi,

Here’s an interesting one.   I am dragging an object and am recording x and y each time I get an onTouch event.

My question is, For each onTouch event, the x and y can vary quite a bit, (if you drag an object fast vs slow)

Is there a way to record the movement of an object without the acceleration so that the movement is uniform (with no acceleration)? 

If I move a player from A to B , and then another player from C to D, I want their movement to match, what I am getting is different speeds based on how quickly the user dragged the object.

Thanks for any help!  Greg

For Example:

Moving Slow         Moving Fast

Tick   X Slow     X Fast Drag

1    100            100

2    101            106

3    102            111

4    103            116

5    104            119

6    105            125

Are you just interested in moving these objects along a path, or are you trying to simply move the objects in a straight line from A to B? 

If the latter, I’d suggest just collecting the start X/Y and end X/Y of the touch function, and then transitioning the objects to those coordinates with a specific time, rather than trying to record every coordinate.

If the former, I’d suggest setting up a timer to record the X/Y coordinates at specific intervals, so that you can condition the player to drag their finger at a specific speed.

Hi Jedi,

>>>I’d suggest setting up a timer to record the X/Y coordinates at specific intervals, so that you can condition the player to drag their finger at a specific speed.

In a sense the o/s is acting as the timer.   The onMove event must be getting called every few milliseconds. The faster the user drags the object, the bigger the gaps get between the x and y of the events.   This seems shows up more on the emulator than on a device. 

I guess if I could increase the frequency of the onMove events I could get the resolution I am looking for, but its like you say, it might end up being a user conditioning issue.

Thanks for the idea, Greg

Are you just interested in moving these objects along a path, or are you trying to simply move the objects in a straight line from A to B? 

If the latter, I’d suggest just collecting the start X/Y and end X/Y of the touch function, and then transitioning the objects to those coordinates with a specific time, rather than trying to record every coordinate.

If the former, I’d suggest setting up a timer to record the X/Y coordinates at specific intervals, so that you can condition the player to drag their finger at a specific speed.

Hi Jedi,

>>>I’d suggest setting up a timer to record the X/Y coordinates at specific intervals, so that you can condition the player to drag their finger at a specific speed.

In a sense the o/s is acting as the timer.   The onMove event must be getting called every few milliseconds. The faster the user drags the object, the bigger the gaps get between the x and y of the events.   This seems shows up more on the emulator than on a device. 

I guess if I could increase the frequency of the onMove events I could get the resolution I am looking for, but its like you say, it might end up being a user conditioning issue.

Thanks for the idea, Greg