How to move sprite immediately following finger drag on screen?

How to move sprite immediately following finger drag on screen?
0.0 0


Hello everyone,
I’m newbie of cocos2d-x, but I met some problems…

I am trying to move my sprite just following user drags their finger on the screen.
I coded that it gets the touch position on TouchMoved and setPosition on that sprite,
but it moves not exactly same as finger move… it follows finger little slowly.
I want it to be at a steady pace…

Do I need to tuning something for this?
Dropping down touch dpi or change configuration of something.?. (but I don’t know how to do it)

Or is this the limitation of cocos2d-x?

Any help would be appreciated.
Thank you.



this is limited by the device implementation, and game engines in general

on devices, there is always a lag between touch and the message to the system, this is especially apparent with Android devices.

then there is a lag in game engine, say your game is running at 60FPS, the next game update will be 0-17ms away, adding this lag to the device lag, you get that the sprite does not follows your touch at exact pace effect.

there is not much you can do, you could however implement your own prediction method, that places the sprite somewhere you think it might go.


Thank you so much.
I think I need to find some alternative way.