Making a Z order system: Adding a layer system

2

Tagged

Features on these Courses

Stats

1,508 visits, 2,645 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 15 May, 2019.

In this tutorial we are going to build up from the beginner tutorial and write a slightly more complex system. This new system will allow to set up virtual layers for the Z order, allowing objects to stay on top even if other objects have a larger Y coordinate.

We will take the same ZOrder family as the previous tutorial. We will add a new variable named “layer” next to the “order” variable. This “layer” variable will host the layer number the object will be on.

We will now extend the beginner code to account for this new change.

That way, the order variable for higher layers will be higher than that of lower layers. LayoutHeight is only used as an arbitrary large value. If you have objects outside the layout boundaries, and/or are using unbounded scrolling, you might want to give it a larger number to avoid weird issues.

  • 0 Comments

Want to leave a comment? Login or Register an account!