zposition

In SpriteKit, how is zPosition used for rendering and for hit tests?

馋奶兔 提交于 2019-12-08 13:52:21
问题 Edit: Apple fixed this in iOS8, so it was certainly not expected/intended but a bug. It appears that the zPosition is interpreted differently when used for rendering a node vs when used for determining which node is touched. When I create a hierarchy of parent and childnodes (all with zPosition set), the topmost node for rendering is determined by the summation of all zPositions leading to the node, so nodes from different parents can be interleaved. When determining the topmost node for