ios - Creating a camera effect in Sprite Kit -
i trying create game scrolls when user's touch close plenty top of iphone screen. have far:
-(void)update:(cftimeinterval)currenttime { cgpoint currentlocation = [currenttouch locationinview:currenttouch.view]; if (currentlocation.y > 100) { _world.position.y - 25; } } so current location cgpoint derived touch registered in touchesbegan method. took y of (x doesn't matter don't think) , told scoot sknode in scene attached down. nil happening , warning 'the look result unused' during statement. i'm winging on one. ideas why doesn't work or improve solutions?
you not assign result of subtraction, result discarded:
_world.position.y - 25; to assign new position:
cgfloat newy = _world.position.y - 25; _world.position = cgpointmake(_world.position.x, newy); ios objective-c camera sprite-kit cgpoint
No comments:
Post a Comment