I'd follow these steps.-
- Extend
CCSprite
to add a propertyCCSprite *spriteToFollow
- You should also add a
CGPoint
to store the offset between two sprites when they collide. - Once one
CustomSprite
collides with another one, set the properspriteToFollow
- On
CustomSprite init
method, call toscheduleUpdate
- On
update
method, ifspriteToFollow
exists, update the current tospriteToFollow.position + offset
Hope it helps.