class MeshComponent : Collider

book_4_sparkGenerated
code_blocksInput

Description

The MeshComponent class in the Sandbox namespace represents an editable polygon mesh with collision capabilities. It is a sealed class, meaning it cannot be inherited. This class provides properties and methods to manipulate the mesh, including setting materials, rebuilding the mesh, and handling collision types.

Members

Properties

Member NameSummary
MeshGets or sets the polygon mesh associated with this component.
CollisionGets or sets the type of collision for the mesh.
ColorGets or sets the tint color of the mesh.
SmoothingAngleGets or sets the angle used for smoothing the mesh.
HideInGameDetermines whether the mesh is hidden in the game.
ModelGets the model associated with this mesh component. This property is hidden and ignored in JSON serialization.
IsConcaveIndicates whether the mesh is concave.
LocalBoundsGets the local bounding box of the mesh.

Methods

Member NameSummary
SetMaterialSets the material for a specific triangle in the mesh.
GetMaterialGets the material of a specific triangle in the mesh.
RebuildMeshRebuilds the mesh, updating its geometry and collision data.