Programming language Swift!

Two objects can be associated with a physical property pinned. Pinned – boolean value that indicates whether the physics body’s node is pinned to its parent node.
The default value is false. If true, the node’s position is fixed relative to its parent. The node’s position can not be changed by actions or physics forces. The node can freely rotate around its position in response to collisions or other forces. If the parent node has a physics body, the two physics bodies are treated as if they are connected with a pin joint.
If one object moves, the second move after him, if the physical properties of the dynamics true! Using the position set the distance between objects.

Watch for further lessons on the Swift!
To help programmers)