I don’t know if there is already a way, but it will be nice if we can have a way to change the display order (like during the game)
There is no way of changing the display order within the game or by behaviors (that I know of). You can only change it within the editor.
I agree, it’d be pretty handy
There have been many times I wanted to have it as a behavior. Hopefully someday, lol.
This has been requested enough that it’s definitely going to happen. The main reason it hasn’t happened yet is that the engine will need to be updated so that every object can have it’s own order value (instead of every object type)
If it’s that big of a change it could be the main focus of the next major update
One simple workaround already exists for this, and that’s to use spawn/attach order instead of display order. Objects that are newly spawned or attached are placed on a higher layer than objects of the same type that are already in the game.
You can set every object type to the same layer, then spawn them in the order you need them to be (furthest back–>farthest front). So if you need something to “change” layers, you can delete the object and then respawn/reattach it and it will appear above other objects. This unfortunately does mean that you can only “move” objects from back to front, and not vice versa.
However, you can get more complicated with it, and use the normal object layer property, but then use the spawn/attach order to get “sub-layers” within objects that are close in layer to each other.
I can provide a game example if that explanation doesn’t make sense.
But yes, of course it would just be so much nicer to have a layer behavior that lets you change an object’s layer mid-game.
Do you have any exemple, like a game that use this
I did something similar in this example:
When the car goes on top of the bridge it adds another car on top that makes it appear on top of the bridge, when it really just drives underneath.
Then takes it off when it enters the underside of the bridge.
Thx a lot, that will sure help me
The problem with this is that you have to do this with all objects and have attachments for ever layer you need. The atom example in my newer orbit system uses attachments. It’s incredibly inconvenient.
Yep, that’s why I really hope we get layer control soon, it takes forever as it is now
Thx Grazer for adding the behaviour, it will surely help me