Hi Code Project Members
I am in dire need of some help, please see below. I am having trouble finding a solution!
iPhone 6 Demo App
Using SpriteKit
What I would like to do is to attach two SKSpriteNodes together.
Node 1 square 100x100
Node 2 square 50x50
I would like the two nodes to be independent within the GameScene, I would like to be able to drag and drop each node within the scene, but if I drag node 2 over Node 1 (top left corner) and release my finger, Node 2 anchors to Node 1 in the top left corner. Now when I move Node 2, Node 1 moves with it.
If I press node 2 again, the anchoring is removed and the 2 Nodes are independent again.
I would like the same to happen for each corner of Node 1.
I would like to be able add additional Nodes to the scene with the same functionality. There fore each Node will have its own class.
I hope that makes sense.
can one of you guys help with sample code or direction on how this can be achieved?
Thanks in advance!