fix bad 3D overlapping using z_index

This commit is contained in:
MathItYT 2024-10-27 14:06:35 -03:00
parent 1139b545f9
commit 1738876f43

View file

@ -373,8 +373,8 @@ class Scene(object):
Groups of all clusters of adjacent Mobjects in the scene Groups of all clusters of adjacent Mobjects in the scene
""" """
batches = batch_by_property( batches = batch_by_property(
self.mobjects, sorted(self.mobjects, key=lambda m: m.z_index),
lambda m: str(type(m)) + str(m.get_shader_wrapper(self.camera.ctx).get_id()) lambda m: str(type(m)) + str(m.get_shader_wrapper(self.camera.ctx).get_id()) + str(m.z_index)
) )
for group in self.render_groups: for group in self.render_groups: