Synchronise nodes movement

Hi,

I would like to make a sync movement of nodes in board game. Few years ago when I was doing just node move for each node individually, for some platform the movement seemed to be async (probably due to rounding of each individual node movement during transformation).

I came to a conclusion to use one node and others to add as children and move that node. Now, in the board game I need to move different number of tiles each node. So I need to move one node 3 blocks up, another 2 blocks up and want to sync their movements while they move. Also I would like this “mover” node to be a separate component in cocos creator so that I can give a class with nodes needed for movement as input properties in Creator.

The question is: is it right way of thinking, and I need to cunstruct such class or I am missing something that can synchronise movements of nodes (e.g. each tick/update)?

Hi, checkout stuff like cc.moveBy and cc.moveTo, if you don’t need to pause or reverse your animations mid-air they should work for you.
If you still have sync movement issues but don’t want to switch parents, you can try picking one moving node as a “main” node, and update other’s position from position-changed callback on this node

Thanks! I will try it.

I have used it previously (may be something changed during few years in engine), but it was so that when two nodes goes close to each another you can see that the distance increase/decrease, so their movement not synced. That was the reason for problem.