Limiting the speed of a dragged sprite in Cocos2dx
Posted
by
Frozsht
on Game Development
See other posts from Game Development
or by Frozsht
Published on 2013-11-02T06:13:36Z
Indexed on
2013/11/02
10:15 UTC
Read the original article
Hit count: 155
I am trying to drag a row of sprites using ccTouchesMoved. By that I mean that there is a row of sprites (they are colored squares) lined up next to each other and if I grab one with a touch the rest follow it. However, if the sprite that is selected by touch moves too fast it creates a slight gap between it and the following sprites. How do I go about limiting the speed that I can drag the sprite with ccTouchesMoved? This is the only solution I could think of to my problem. If anyone has another suggestion to prevent this sprite gap from happening I would appreciate it.
© Game Development or respective owner