-
Notifications
You must be signed in to change notification settings - Fork 0
class_meshinstance
####Inherits: GeometryInstance ####Category: Core
Node that instances meshes into a [Scenario].
- void
set_mesh( Mesh mesh ) -
Mesh
get_mesh( ) const -
AABB
get_aabb( ) const - void
create_trimesh_collision( ) - void
create_convex_collision( )
MeshInstance 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 to get 3D geometry rendered and can be used to instance a sigle Mesh in many places. This allows to reuse geometry and save on resources. When a Mesh has to be instanced more than thousands of times at close proximity, consider using a MultiMesh in a MultiMeshInstance instead.
- void
set_mesh( Mesh mesh )
Set the Mesh resource for the instance.
-
Mesh
get_mesh( ) const
Return the current Mesh resource for the instance.
-
AABB
get_aabb( ) const
Return the AABB of the mesh, in local coordinates.
- void
create_trimesh_collision( )
This helper creates a StaticBody child Node using the mesh geometry as collision. It"apos;s mainly used for testing.