Screen Layering Change on Event

vfraviator shared this question 6 years ago
Answered

Is there a way to change the layering of an object on an event? I have two master items that keep getting in the way of each other on a screen, and I'd like to be able to change the order of these items by having the item being interacted with always appear in the top layer, overshadowing all other items on the screen temporarily, regardless of specified layering order. When the interaction is done, a way to reset the layering to it's default would be needed to bring the screen back into alignment.

Comments (1)

photo
1

Well, the closest you can get to that is to use a 'on drag event - move with cursor'. That moves the thing you are moving to the top layer. You could even control if you want to move the element using a variable that is initialized when the drag starts and changes when the drag stops.