MeshInstance2D

Inherits: Node2D < CanvasItem < Node < Object

Node used for displaying a Mesh in 2D.

Description

Node used for displaying a Mesh in 2D. A MeshInstance2D can be automatically created from an existing Sprite via a tool in the editor toolbar. Select the Sprite node, then choose Sprite > Convert to MeshInstance2D at the top of the 2D editor viewport.

Tutorials

Properties

Mesh

mesh

Texture

normal_map

Texture

texture


Signals

texture_changed ( )

Emitted when the texture is changed.


Property Descriptions

Mesh mesh

  • void set_mesh ( Mesh value )

  • Mesh get_mesh ( )

The Mesh that will be drawn by the MeshInstance2D.


Texture normal_map

The normal map that will be used if using the default CanvasItemMaterial.

Note: Godot expects the normal map to use X+, Y+, and Z+ coordinates. See this page for a comparison of normal map coordinates expected by popular engines.


Texture texture

The Texture that will be used if using the default CanvasItemMaterial. Can be accessed as TEXTURE in CanvasItem shader.