.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_MeshInstance: MeshInstance ============ **Inherits:** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Node that instances meshes into a scenario. Member Functions ---------------- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`create_convex_collision` **(** **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`create_debug_tangents` **(** **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`create_trimesh_collision` **(** **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Mesh` | :ref:`get_mesh` **(** **)** const | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`NodePath` | :ref:`get_skeleton_path` **(** **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Material` | :ref:`get_surface_material` **(** :ref:`int` surface **)** const | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_mesh` **(** :ref:`Mesh` mesh **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_skeleton_path` **(** :ref:`NodePath` skeleton_path **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_surface_material` **(** :ref:`int` surface, :ref:`Material` material **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- - :ref:`Mesh` **mesh** - :ref:`NodePath` **skeleton** Description ----------- MeshInstance is a :ref:`Node` that takes a :ref:`Mesh` resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single :ref:`Mesh` in many places. This allows to reuse geometry and save on resources. When a :ref:`Mesh` has to be instanced more than thousands of times at close proximity, consider using a :ref:`MultiMesh` in a :ref:`MultiMeshInstance` instead. Member Function Description --------------------------- .. _class_MeshInstance_create_convex_collision: - void **create_convex_collision** **(** **)** .. _class_MeshInstance_create_debug_tangents: - void **create_debug_tangents** **(** **)** .. _class_MeshInstance_create_trimesh_collision: - void **create_trimesh_collision** **(** **)** This helper creates a :ref:`StaticBody` child :ref:`Node` using the mesh geometry as collision. It's mainly used for testing. .. _class_MeshInstance_get_mesh: - :ref:`Mesh` **get_mesh** **(** **)** const Return the current :ref:`Mesh` resource for the instance. .. _class_MeshInstance_get_skeleton_path: - :ref:`NodePath` **get_skeleton_path** **(** **)** .. _class_MeshInstance_get_surface_material: - :ref:`Material` **get_surface_material** **(** :ref:`int` surface **)** const .. _class_MeshInstance_set_mesh: - void **set_mesh** **(** :ref:`Mesh` mesh **)** Set the :ref:`Mesh` resource for the instance. .. _class_MeshInstance_set_skeleton_path: - void **set_skeleton_path** **(** :ref:`NodePath` skeleton_path **)** .. _class_MeshInstance_set_surface_material: - void **set_surface_material** **(** :ref:`int` surface, :ref:`Material` material **)**