1

I read the Sprite Programing guide and they describe how children's zPosition is based off it's parent.

For example if parent has 100 zPosition and the child has 1 zPosition. The child will have a relative (to scene) zPosition of 101. Assuming that ignoreSibling order is set to true, for efficiency.

Using this logic: If a child doesn't have a zPosition or a zPosition of zero, will it's relative zPosition be the same as it's parent ?

For example: If parent has a zPosition of 100 and child has a zPosition of 0. Child has a relative zPosition of 100.

If this is true it means that we should always set our children's zPosition to 1 in order to avoid the possibility of the parent being rendered on top of the child.

I read similar questions but they seem to ignore the case where a child doesn't have a zPosition.

3366784
  • 2,423
  • 1
  • 14
  • 27

0 Answers0