cocos2d-objc
cocos2d-objc copied to clipboard
CCActionFollow is wrong
See also #1164
CCActionFollow doesn't actually follow a node. It mirrors the movement of the node. When the target moves left, the action moves its node to the right. Theoretically this might be useful for some sort of a camera situation, but now we have a CCViewport node.
This should be changed to do what it describes.
It's a pretty popular one for camera, as long as CCViewPort covers this conveniently then great. There is a nice extension of the follow action that adds camera smoothing, be nice to have that also out of the box.
Maybe the solution is to rename that functionality to CCActionCameraFollow, or something like that? There doesn't seem to be any action to get one node to lock onto the position of another node.
On Jan 26, 2015, at 2:01 PM, cocojoe [email protected] wrote:
It's a pretty popular one for camera, as long as CCViewPort covers this conveniently then great. There is a nice extension of the follow action that adds camera smoothing, be nice to have that also out of the box.
— Reply to this email directly or view it on GitHub https://github.com/cocos2d/cocos2d-swift/issues/1183#issuecomment-71527332.
Bit of a mouthful however makes sense. Here is the flavour I used to use in Cocos2D 2.X with a few mods. Is handy to change tracking of various nodes.
https://gist.github.com/cocojoe/357cc2879a309e05716e