I have several texture nodes which move to right constantly. For some reason, one of the types of texture nodes generates a white line in-between itself and the next node when moving, only when moving.
The image is 60 x 60 and 3/4 of the image is transparent and 1/4 is coloured a green color. When I change the image to a solid color at 60 x 60 (no transparency) and run the app, the line disappears?
Here is my code:
func generateGroundSegment_SingleSegment() {
nodeSegment = SKSpriteNode()
nodeSegment.texture = arrayTextureSegment[Int(myElement)]
nodeSegment.size.width = sizeSegmentWidth
nodeSegment.size.height = sizeSegmentHeight
nodeSegment.position.x = countSegmentX * sizeSegmentWidth
nodeSegment.position.y = (countSegmentY * sizeSegmentHeight) - nodeWaterLayer1_1.size.height - nodeSegment.size.height/2
nodeSegment.zPosition = 190
//generateGroundSegment_Type()
nodeMovingPlatform9.addChild(nodeSegment)
}
The node with the white line is a child to another node which has a zPosition of 0, is coloured clear and is the node that moves to the left. The node that move to the left is a child to one other node, and this node also has a zPosition of 0 and is coloured clear.
Does anybody know what might be causing this? I though maybe the image was trying to resize or something, that is why a specified the nodeSegment width and height. I have other image used, and none of them have the white line appear. All images are 60 x 60.