Reputation: 1145
I have read that cocos has a method called CCFollow that change the node position accordingly to the position of a another node, something like "change che background position to follow the player position". In SpriteKit there's something similar? Or the only way is to modify the Node position manually or by an action?
EDIT
I have tried to move by action like moveTo, it works but in my game i have to move a large background image and some physics shape (that are the bonduaries of my racetrack). Moving the node that containt all my game with an skaction works but it cause jitters in iphone4 (even with a constant 30 fps, it seems a too cpu intese works, almost like 60% ). Until now the only solution is to simplify and reduce racetrack dimensions but i'm searching some others solutions... I have read about CCFollow,so i think that maybe this is an optimized method that solve my troubles...
Upvotes: 0
Views: 103
Reputation: 7127
A better way would be changing the camera position. Instead of using a large image as background (this is highly not recommended)
Please refer to this under "Moving the Camera" section.
Upvotes: 1