G
G
gigi19882017-10-08 20:43:25
iOS
gigi1988, 2017-10-08 20:43:25

How can you link objects and move them along the same path in SpriteKit Xcode?

I am making a game on SpriteKit for IOS (2D). It is necessary to implement the rotation of objects along a closed trajectory around the column (carousel). 4 objects rotate around the pole at the same time. Accordingly, you need to change the Zposition of the object approaching the pillar and away from the pillar, respectively. Running 4 objects simultaneously for rotation and tracking the position of each is problematic and very cumbersome. Plus, there is a problem that when simultaneously launching objects to move, they do not always reach the given position at the same time. The error is 1-2 pixels. Is it possible to bind objects in a spritekit and launch them along a given path? I know that you can build an ellipse and move objects around the graph, but I can't figure out how to connect them, so that they move one after another in a bunch and how to keep track of the position to change zPosition when moving? There is the concept of a navigation graph, but I did not find any detailed examples of its use. Prompt in what direction to search for the decision.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question