ZIndex - theRAPTLab/gsgo GitHub Wiki
zIndex is a little complicated currently.
zIndex
is a built-in agent property.
prop zIndex setTo 5
NOTE that zIndex may not take effect immediately. The sort order of sprites is not necessarily updated when zIndex
is set. The sort order is only updated with a PIXI UpdateTransform()
call, which generally happens when positions are changed
NOTE that zIndex affects the selectability/clickability of agents. The agent with the highest zIndex gets the click. This can be an issue if you have agents overlapping other agents.
All agents default to 0.
zIndex | Objects |
---|---|
-1000 | Simulation Background |
0 | Default zIndex |