• 2D
  • How can I transform the 3D orientation of a mesh brought into a Multi or MeshInstance2D

When I am in a MultiMeshInstance2D, there is an option "Transform Format" with the two choices 2D or 3D as shown below. As far as I can see, this does not exist for the MeshInstance2D but it also seem to have no impact at all on the MultiMeshInstance2D as I cannot find anywhere to set an axis of rotation other than the Z axis that all 2D sprite have.

Am I misunderstanding what this option does? Have I missed where I can rotate the MeshInstance2D or MultiMeshInstance2D on anything other than the Z axis? This would be incredibly useful to me as I keep on wanting to distort 2D sprites as if they were receding into 3D space like this.

Any help or insight would be greatly appreciated

3 months later

The Transform Format option decides the format of the Transform property you assign for each MeshInstance inside MultiMesh.

The way you do it is by using the set_instance_transform method, which will change the Transform (2D or 3D, depending on your choice of Transform Format) of a selected instance within the MultiMesh. Then you can either select the instances you want by number or change all of them with a simple for loop.

Here is the relevant tutorial (works in both 2D and 3D, adjust accordingly): https://docs.godotengine.org/en/stable/tutorials/3d/vertex_animation/animating_thousands_of_fish.html#making-a-school-of-fish