I could recreate you problem and found the solution:
Don't position the SKShapeNode
by setting the start and end point in CGRectMake()
. Instead, just use the regular postion
property of the SKShapeNode
. Otherwise, the nodes seem to overlap each other, although the shapes are at different coordinates.
SKShapeNode *bg = [SKShapeNode node];
[bg setPath:CGPathCreateWithRoundedRect(CGRectMake(0, 0, 50, 50), 6, 6, nil)];
bg.position = CGPointMake(self.size.width-50*2, 55);
bg.fillColor = [SKColor orangeColor];
bg.glowWidth = 0;
bg.name = @"6";
return bg;