You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Make YSort stable
Keeps track of the order in which items are collected by _collect_ysort_children, and uses that order to break ties between items with similar Y positions.
This commit is contained in:
@@ -81,6 +81,7 @@ void _collect_ysort_children(RenderingServerCanvas::Item *p_canvas_item, Transfo
|
||||
child_items[i]->ysort_xform = p_transform;
|
||||
child_items[i]->ysort_pos = p_transform.xform(child_items[i]->xform.elements[2]);
|
||||
child_items[i]->material_owner = child_items[i]->use_parent_material ? p_material_owner : nullptr;
|
||||
child_items[i]->ysort_index = r_index;
|
||||
}
|
||||
|
||||
r_index++;
|
||||
|
||||
Reference in New Issue
Block a user