Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | dschorak |
Hi,
experimenting with godots 2d part I ran in a very simple problme I could not find a solution to: How do I set the z order for multimeshes? Particulraily, in the code example below, i’d like to set the zorder dependent on the y-coordinate. Did I miss something?
extends MultiMeshInstance2D
func _ready():
self.multimesh.mesh = get_parent().mesh;
for i in range(self.multimesh.instance_count):
multimesh.set_instance_transform_2d(i, Transform2D(0.0, Vector2(float(randi()%2000), float(randi()%2000))));
pass