Why are objects in the same SKNode layer not interacting with each other?
问题 I have less than 1 year using SpriteKit so I didn't use SKNodes as layers before until recently. I have an SKNode layer that holds all of the fish and the user's position, for example: var layerMainGame = SKNode() layerMainGame.zPosition = 50 layerMainGame.addChild(userPosition) layerMainGame.addChild(pipFish) addChild(layerMainGame) The interaction whether the user touched a fish or not is handled with this function, which is basically checking if their frames crossed: if