2017-09-12 20:42:36 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-02-14 13:18:53 +00:00
<class name= "MeshInstance3D" inherits= "GeometryInstance3D" version= "4.0" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-09-12 20:42:36 +00:00
<brief_description >
Node that instances meshes into a scenario.
</brief_description>
<description >
2022-07-29 19:48:12 +00:00
MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reusing geometry, which can save on resources. When a [Mesh] has to be instantiated more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
2017-09-12 20:42:36 +00:00
</description>
<tutorials >
2020-10-01 08:34:47 +00:00
<link title= "3D Material Testers Demo" > https://godotengine.org/asset-library/asset/123</link>
<link title= "3D Kinematic Character Demo" > https://godotengine.org/asset-library/asset/126</link>
<link title= "3D Platformer Demo" > https://godotengine.org/asset-library/asset/125</link>
<link title= "Third Person Shooter Demo" > https://godotengine.org/asset-library/asset/678</link>
2017-09-12 20:42:36 +00:00
</tutorials>
<methods >
<method name= "create_convex_collision" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "clean" type= "bool" default= "true" />
<param index= "1" name= "simplify" type= "bool" default= "false" />
2017-09-12 20:42:36 +00:00
<description >
2020-03-30 16:22:57 +00:00
This helper creates a [StaticBody3D] child node with a [ConvexPolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing.
2022-08-12 13:36:48 +00:00
If [param clean] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed.
2022-08-17 22:08:09 +00:00
If [param simplify] is [code]true[/code], the geometry can be further simplified to reduce the number of vertices. Disabled by default.
2017-09-12 20:42:36 +00:00
</description>
</method>
2021-04-29 10:10:58 +00:00
<method name= "create_debug_tangents" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2020-04-30 06:41:22 +00:00
<description >
2021-04-29 10:10:58 +00:00
This helper creates a [MeshInstance3D] child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing.
2020-04-30 06:41:22 +00:00
</description>
</method>
2021-04-29 10:10:58 +00:00
<method name= "create_multiple_convex_collisions" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2017-09-12 20:42:36 +00:00
<description >
2021-04-29 10:10:58 +00:00
This helper creates a [StaticBody3D] child node with multiple [ConvexPolygonShape3D] collision shapes calculated from the mesh geometry via convex decomposition. It's mainly used for testing.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "create_trimesh_collision" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2017-09-12 20:42:36 +00:00
<description >
2020-03-30 16:22:57 +00:00
This helper creates a [StaticBody3D] child node with a [ConcavePolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing.
2017-09-12 20:42:36 +00:00
</description>
</method>
2021-10-15 22:04:35 +00:00
<method name= "find_blend_shape_by_name" >
<return type= "int" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "name" type= "StringName" />
2021-10-15 22:04:35 +00:00
<description >
</description>
</method>
2020-01-31 01:18:09 +00:00
<method name= "get_active_material" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Material" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "surface" type= "int" />
2020-01-31 01:18:09 +00:00
<description >
Returns the [Material] that will be used by the [Mesh] when drawing. This can return the [member GeometryInstance3D.material_override], the surface override [Material] defined in this [MeshInstance3D], or the surface [Material] defined in the [Mesh]. For example, if [member GeometryInstance3D.material_override] is used, all surfaces will return the override material.
</description>
</method>
2021-10-15 22:04:35 +00:00
<method name= "get_blend_shape_count" qualifiers= "const" >
<return type= "int" />
<description >
</description>
</method>
<method name= "get_blend_shape_value" qualifiers= "const" >
<return type= "float" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "blend_shape_idx" type= "int" />
2021-10-15 22:04:35 +00:00
<description >
</description>
</method>
2021-04-14 03:45:16 +00:00
<method name= "get_surface_override_material" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Material" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "surface" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2020-01-31 01:18:09 +00:00
Returns the override [Material] for the specified surface of the [Mesh] resource.
2017-09-12 20:42:36 +00:00
</description>
</method>
2021-04-14 03:45:16 +00:00
<method name= "get_surface_override_material_count" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
2018-10-25 13:14:36 +00:00
<description >
2021-04-14 03:45:16 +00:00
Returns the number of surface override materials. This is equivalent to [method Mesh.get_surface_count].
2018-10-25 13:14:36 +00:00
</description>
</method>
2021-10-15 22:04:35 +00:00
<method name= "set_blend_shape_value" >
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "blend_shape_idx" type= "int" />
<param index= "1" name= "value" type= "float" />
2021-10-15 22:04:35 +00:00
<description >
</description>
</method>
2021-04-14 03:45:16 +00:00
<method name= "set_surface_override_material" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "surface" type= "int" />
<param index= "1" name= "material" type= "Material" />
2017-09-12 20:42:36 +00:00
<description >
2020-01-31 01:18:09 +00:00
Sets the override [Material] for the specified surface of the [Mesh] resource. This material is associated with this [MeshInstance3D] rather than with the [Mesh] resource.
2017-09-12 20:42:36 +00:00
</description>
</method>
</methods>
<members >
2019-07-15 18:42:47 +00:00
<member name= "mesh" type= "Mesh" setter= "set_mesh" getter= "get_mesh" >
2017-09-12 20:42:36 +00:00
The [Mesh] resource for the instance.
</member>
2019-06-29 10:38:01 +00:00
<member name= "skeleton" type= "NodePath" setter= "set_skeleton_path" getter= "get_skeleton_path" default= "NodePath("..")" >
2020-03-30 16:22:57 +00:00
[NodePath] to the [Skeleton3D] associated with the instance.
2017-09-12 20:42:36 +00:00
</member>
2019-09-24 09:44:48 +00:00
<member name= "skin" type= "Skin" setter= "set_skin" getter= "get_skin" >
2020-01-14 21:27:14 +00:00
Sets the skin to be used by this instance.
2019-09-24 09:44:48 +00:00
</member>
2017-09-12 20:42:36 +00:00
</members>
</class>