CGFloat deltaX = [theEvent deltaX], deltaY = [theEvent deltaY], deltaZ = [theEvent deltaZ];
sample_sprite.position = ccp( sample_sprite.position.x, sample_sprite.position.y+deltaY*5);//moving a sprite vertically by scrolling the scrollwheel
Incoming search terms:
- mouse position cocos2d-x
Like this post? Subscribe to my RSS feed and get loads more!