MeshPart
A form of BasePart that includes a physically simulated custom mesh.
Memory category | PhysicsParts |
---|
Member index 17
Removed member index 6
History | Member | |
---|---|---|
381 | CollisionFidelity: CollisionFidelity | |
246 | Material: Material | |
535 | MeshSize: Vector3 | |
322 | TextureId: Content |
Description
MeshPart is a form of BasePart that includes a physically simulated custom mesh. Unlike with other mesh classes, such as SpecialMesh and BlockMesh, they are not parented to a BasePart but rather behave as a BasePart in their own right.
The mesh and texture of a MeshPart are determined by the MeshId and TextureID properties. For more information, see Meshes.
History 86
- 649 Change CanSave of from false to true
- 649 Change CanLoad of from false to true
- 649 Change CanSave of from false to true
- 649 Change CanLoad of from false to true
- 648 Change Tags of from [Hidden, NotReplicated] to [Hidden]
- 648 Change Tags of from [Hidden, NotReplicated] to [Hidden]
- 647 Add
- 647 Add
- 645 Change ValueType of TextureID from Content to ContentId
- 645 Change ValueType of MeshId from Content to ContentId
- 645 Change ValueType of from Content to ContentId
- 635 Change Default of from Precise to Automatic
- 635 Change Default of RenderFidelity from Precise to Automatic
- 602 Add
- 602 Remove
- 601 Add
- 591 Remove
- 581 Add
- 573 Change ReturnType of ApplyMesh from void to null
- 553 Add
- 553 Add
- 553 Change Default of RenderFidelity from to Precise
- 553 Add
- 553 Add
- 553 Change Default of from to Vector3(0, 0, 0)
- 553 Add
- 553 Change Default of from to false
- 553 Change Default of from to false
- 553 Change Default of DoubleSided from to false
- 553 Add
- 536 Remove
- 535 Remove MeshSize
- 486 Change ThreadSafety of TextureID from ReadOnly to ReadSafe
- 486 Change ThreadSafety of RenderFidelity from ReadOnly to ReadSafe
- 486 Change ThreadSafety of MeshSize from ReadOnly to ReadSafe
- 486 Change ThreadSafety of MeshId from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of DoubleSided from ReadOnly to ReadSafe
- 462 Change ThreadSafety of ApplyMesh from to Unsafe
- 462 Change ThreadSafety of TextureID from to ReadOnly
- 462 Change ThreadSafety of RenderFidelity from to ReadOnly
- 462 Change Tags of RenderFidelity from [] to [NotReplicated]
- 462 Change ThreadSafety of MeshSize from to ReadOnly
- 462 Change ThreadSafety of MeshId from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of DoubleSided from to ReadOnly
- 454 Add ApplyMesh
- 454 Add MeshSize
- 452 Remove ApplyMesh
- 452 Remove MeshSize
- 453 Add ApplyMesh
- 453 Add MeshSize
- 451 Change Tags of DoubleSided from [NotScriptable] to []
- 450 Add DoubleSided
- 440 Add
- 440 Add
- 436 Add
- 386 Change Category of RenderFidelity from Behavior to Appearance
- 381 Add RenderFidelity
- 381 Remove CollisionFidelity
- 381 Change Superclass of MeshPart from BasePart to TriangleMeshPart
- 355 Change CanSave of CollisionFidelity from true to false
- 355 Change CanLoad of CollisionFidelity from true to false
- 349 Add
- 349 Add CollisionFidelity
- 322 Remove TextureId
- 322 Change Tags of TextureID from [Deprecated] to []
- 322 Add TextureId
- 322 Change Tags of TextureID from [] to [Deprecated]
- 273 Add MeshId
- 272 Remove TextureId
- 272 Change Tags of TextureID from [Deprecated] to []
- 272 Remove MeshId
- 273 Add TextureId
- 273 Change Tags of TextureID from [] to [Deprecated]
- 273 Add MeshId
- 246 Remove Material
- 244 Add Material
- 242 Add TextureID
- 242 Add MeshPart
Members 17
ApplyMesh
Parameters (1) | ||
---|---|---|
meshPart | Instance | |
Returns (1) | ||
null |
Overwrites the MeshContent,
TextureContent, and collision geometry
properties of this MeshPart from the given source meshPart
.
Most of these properties are read-only and cannot be changed during runtime on their own directly. To keep MeshContent and physics data in sync, they must be updated together.
Copies the following properties:
- MeshPart.MeshContent (implicitly updates MeshId)
- MeshPart.TextureContent (implicitly updates TextureID)
- MeshPart.RenderFidelity
- MeshPart.CollisionFidelity (with any internal collision geometry)
- MeshPart.FluidFidelity (with any internal aero geometry)
- MeshPart.MeshSize
Thread safety | Unsafe |
---|
DoubleSided
Type | Default | |
---|---|---|
bool | false |
This property determines whether to render both faces of polygons in the mesh. It is only changeable in Studio. This is useful for meshes that are typically modeled as "cards" such as a leaf, hair, or cloth.
Write security | PluginSecurity |
---|---|
Thread safety | ReadSafe |
Category | Appearance |
Loaded/Saved | true |
History 5
- 553 Change Default of DoubleSided from to false
- 486 Change ThreadSafety of DoubleSided from ReadOnly to ReadSafe
- 462 Change ThreadSafety of DoubleSided from to ReadOnly
- 451 Change Tags of DoubleSided from [NotScriptable] to []
- 450 Add DoubleSided
MeshId
Type | Default | |
---|---|---|
ContentId |
The asset URIs of the mesh that is displayed on the MeshPart. Reads and writes to MeshContent.
Note that this property cannot be changed directly by scripts, as the collision geometry of the mesh cannot be recomputed in realtime. See AssetService:CreateMeshPartAsync() as a method to create a new MeshPart from a given Content with a specified CollisionFidelity. MeshPart:ApplyMesh() can be used to overwrite the MeshContent, TextureContent, and collision geometry of an existing MeshPart.
Write security | NotAccessibleSecurity |
---|---|
Thread safety | ReadSafe |
Category | Appearance |
Loaded/Saved | true |
RenderFidelity
Type | Default | |
---|---|---|
RenderFidelity | Automatic |
This property determines the level of detail that the MeshPart will be shown in. It can be set to the possible values of the RenderFidelity enum.
The default value is Automatic, meaning the mesh's detail is based on its distance from the camera as outlined in the following table.
Distance From Camera | Render Fidelity | Example |
---|---|---|
Less than 250 studs | Highest | |
250-500 studs | Medium | |
500 or more studs | Lowest |
Write security | PluginSecurity |
---|---|
Thread safety | ReadSafe |
Category | Appearance |
Loaded/Saved | true |
History 7
- 635 Change Default of RenderFidelity from Precise to Automatic
- 553 Change Default of RenderFidelity from to Precise
- 486 Change ThreadSafety of RenderFidelity from ReadOnly to ReadSafe
- 462 Change ThreadSafety of RenderFidelity from to ReadOnly
- 462 Change Tags of RenderFidelity from [] to [NotReplicated]
- 386 Change Category of RenderFidelity from Behavior to Appearance
- 381 Add RenderFidelity
TextureID
Type | Default | |
---|---|---|
ContentId |
The texture applied to the MeshPart. Reads and writes to TextureContent.
When this property is set to an empty string, no texture will be applied to the mesh.
local Workspace = game:GetService("Workspace")
local meshPart = Workspace.MeshPart
meshPart.TextureID = "" -- No texture
Note that the MeshPart.MeshId property cannot be changed during runtime but the texture can. See TextureContent for details.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true |
History 8
- 645 Change ValueType of TextureID from Content to ContentId
- 486 Change ThreadSafety of TextureID from ReadOnly to ReadSafe
- 462 Change ThreadSafety of TextureID from to ReadOnly
- 322 Change Tags of TextureID from [Deprecated] to []
- 322 Change Tags of TextureID from [] to [Deprecated]
- 272 Change Tags of TextureID from [Deprecated] to []
- 273 Change Tags of TextureID from [] to [Deprecated]
- 242 Add TextureID
Removed members 6
CollisionFidelity
Type | Default | |
---|---|---|
CollisionFidelity |
Category | Behavior |
---|---|
Loaded/Saved | false |
History 4
- 381 Remove CollisionFidelity
- 355 Change CanSave of CollisionFidelity from true to false
- 355 Change CanLoad of CollisionFidelity from true to false
- 349 Add CollisionFidelity
Material
Type | Default | |
---|---|---|
Material |
Category | |
---|---|
Loaded/Saved | false |
MeshSize
Type | Default | |
---|---|---|
Vector3 |
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | false |
TextureId
Type | Default | |
---|---|---|
Content |
Category | |
---|---|
Loaded/Saved | false |