What effect addChild and zPosition really have on a scene?
I mean this: suppose I do this
sprite1.zPosition = 50;
sprite2.zPosition = 10;
sprite3.zPosition = 30;
and later do this
[self addChild:sprite1];
[self addChild:sprite2];
[self addChild:sprite3];
according to SpriteKit and considering zPosition order, sprite1 should be rendered over sprite3 over sprite2 but spriteKit ignores that and renders 3 over 2 over 1.
am I missing something?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…