Forums » HTML5 Framework » ccTouchesMoved() event can't keep up user's touches. »
| Wasin Thonkaew | ccTouchesMoved() event can't keep up user's touches. | ||||
|---|---|---|---|---|---|
|
Added by Wasin Thonkaew 10 months ago
I tested a game incorporating ccTouchesMoved() event in the code and found out that the event isn't called fast enough to keep up the changing touch-position from users. Any idea on what might be the problem? Thanks ahead! |
||||
| Hao Wu | RE: ccTouchesMoved() event can't keep up user's touches. | ||||
|
Because the way browser handles touch/mouse event, a new event object is created when an event is triggered, unlike native cocos2d-x. this is a limitation in the browser side, so you need to assign the sprite position for every event. what you saw was your touchended event firing and setting your sprite to that position only. please have a look at touchtest in our test samples |
||||
| Wasin Thonkaew | RE: ccTouchesMoved() event can't keep up user's touches. | ||||
|
Added by Wasin Thonkaew 10 months ago
Thanks Hao Wu ! |
(1-2/2)