I'm trying to implement a pause function to my game. So far I've got it to work by setting my sprites speed to "0". But the sprites on which I've applied easing behave strange when pause button (speed = 0) is pressed; Their translation - Both location and rotation jump to another time/place in the action both when speed is set to "0" as well as when they are reset to "1". I would very much appreciate some input on this issue - Either a fix for my code or a better way of doing it :)
My sprite's movement code:
SKAction* _movePlayerUp = [SKAction moveToY:200 duration:3];
movePlayerUp.timingMode = SKActionTimingEaseOut;
[_playerSprite runAction: movePlayerUp];
Function to enable pause:
_playerSprite.speed = 0;
Function to disable pause:
_playerSprite.speed = 1;
Thank you in advance!
Regards, Espen