Reputation: 1
in cocos2d I need to drag a sprite in my project using finger. how do i get hold of that sprite? any help will be appreciated. thanx. i am using chipmunk engine.
Upvotes: 0
Views: 89
Reputation: 8719
You need to capture the touch began, work out what sprite is being touched and then track the movement of the touch. In touches moved you update the position of the sprite.
Sound complicated? It's not really. Here is a great tutorial for it.
http://www.raywenderlich.com/2343/how-to-drag-and-drop-sprites-with-cocos2d
Upvotes: 2