MeshPart

非推奨を表示

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.

概要

プロパティ

TriangleMeshPart から継承した プロパティBasePart から継承した プロパティ
  • 並列読み取り

    Determines whether a part is immovable by physics.

  • 複製されていません
    並列読み取り

    The angular velocity of the part's assembly.

  • 読み取り専用
    複製されていません
    並列読み取り

    The center of mass of the part's assembly in world space.

  • 複製されていません
    並列読み取り

    The linear velocity of the part's assembly.

  • 読み取り専用
    複製されていません
    並列読み取り

    The total mass of the part's assembly.

  • 読み取り専用
    複製されていません
    並列読み取り

    A reference to the root part of the assembly.

  • 並列読み取り

    Determines the type of surface for the Back face of a part (+Z direction).

  • Determines the type of surface for the Bottom face of a part (-Y direction).

  • 複製されていません
    並列読み取り

    Determines the color of a part.

  • 並列読み取り

    Determines the position and orientation of the BasePart in the world.

  • 並列読み取り

    Determines whether a part may collide with other parts.

  • 並列読み取り

    Determines whether the part is considered during spatial query operations.

  • 並列読み取り

    Determines if Touched and TouchEnded events fire on the part.

  • 並列読み取り

    Determines whether or not a part casts a shadow.

  • 読み取り専用
    複製されていません
    並列読み取り

    Describes the world position in which a part's center of mass is located.

  • 複製されていません
    並列読み取り

    Describes the name of a part's collision group.

  • 複製されていません
    並列読み取り

    Determines the color of a part.

  • 読み取り専用
    複製されていません
    並列読み取り

    Indicates the current physical properties of the part.

  • Determines several physical properties of a part.

  • 並列読み取り

    Used to enable or disable aerodynamic forces on parts and assemblies.

  • 読み取り専用
    複製されていません
    並列読み取り

    The CFrame of the physical extents of the BasePart.

  • 読み取り専用
    複製されていません
    並列読み取り

    The actual physical size of the BasePart as regarded by the physics engine.

  • 並列読み取り

    Determines the type of surface for the Front face of a part (-Z direction).

  • 並列読み取り

    Determines the type of surface for the Left face of a part (-X direction).

  • 非表示
    複製されていません
    並列読み取り

    Determines a multiplier for BasePart.Transparency that is only visible to the local client.

  • 並列読み取り

    Determines whether a part is selectable in Studio.

  • 読み取り専用
    複製されていません
    並列読み取り

    Describes the mass of the part, the product of its density and volume.

  • 並列読み取り

    Determines whether the part contributes to the total mass or inertia of its rigid body.

  • 並列読み取り

    Determines the texture and default physical properties of a part.

  • 複製されていません
    並列読み取り

    The name of MaterialVariant.

  • 非表示
    複製されていません
    並列読み取り

    Describes the rotation of the part in the world.

  • 並列読み取り

    Specifies the offset of the part's pivot from its CFrame.

  • 非表示
    複製されていません
    並列読み取り

    Describes the position of the part in the world.

  • 非表示
    読み取り専用
    複製されていません
    並列読み取り

    Time since last recorded physics update.

  • 並列読み取り

    Determines how much a part reflects the skybox.

  • 読み取り専用
    複製されていません
    並列読み取り

    Describes the smallest change in size allowable by the Resize method.

  • 読み取り専用
    複製されていません
    並列読み取り

    Describes the faces on which a part may be resized.

  • 並列読み取り

    Determines the type of surface for the Right face of a part (+X direction).

  • 並列読み取り

    The main rule in determining the root part of an assembly.

  • 複製されていません
    並列読み取り

    The rotation of the part in degrees for the three axes.

  • 複製されていません
    並列読み取り

    Determines the dimensions of a part (length, width, height).

  • 並列読み取り

    Determines the type of surface for the Top face of a part (+Y direction).

  • 並列読み取り

    Determines how much a part can be seen through (the inverse of part opacity).

PVInstance から継承した プロパティ
  • 複製されていません
    スクリプト作成できません
    並列読み取り
  • 複製されていません
    スクリプト作成できません
    並列読み取り

方法

BasePart から継承した 方法PVInstance から継承した 方法

イベント

BasePart から継承した イベント

プロパティ

DoubleSided

並列読み取り
プラグインのセキュリティ

This property determines whether to render both faces or 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 and cloth.

Example: The tree leaves are modeled with single sided cards.

Leaves as cards

With MeshPart.DoubleSided disabled some leaves are missing since they are back facing the camera.

DoubleSided property disabled

With MeshPart.DoubleSided enabled, both faces of the leaves are rendered.

DoubleSided property enabled

HasJointOffset

非表示
並列読み取り
アクセスできないセキュリティ

HasSkinnedMesh

非表示
並列読み取り
アクセスできないセキュリティ

JointOffset

非表示
並列読み取り
アクセスできないセキュリティ

MeshId

並列読み取り
アクセスできないセキュリティ

The MeshId is the content ID of the mesh that is to be displayed on the MeshPart.

Note that this property currently cannot be changed by scripts as the collision model of the mesh cannot be recomputed during runtime. Developers should not rely on this behavior as it may change in the future. Those looking for a custom mesh object that can be updated during runtime should use SpecialMesh.

RenderFidelity

複製されていません
並列読み取り
プラグインのセキュリティ

This property determines the level of detail that the MeshPart will be shown in. It can be set to the possible values of the Enum.RenderFidelity enum.

By default, MeshParts will always be shown in precise fidelity, no matter how far they are from the camera. This improves their appearance when viewed from any distance, but if a place has a large number of detailed mesh parts, it may reduce overall performance.

Distance From CameraRender Fidelity
Less than 250 studsHighest
250-500 studsMedium
500 or more studsLowest

TextureID

並列読み取り

The texture applied to the MeshPart. When this property is set to an empty string, no texture will be applied to the mesh.


MeshPart.TextureID = "" -- no texture

Note, although the MeshPart.MeshId property cannot be changed during runtime, the texture can.

How can I change the texture of a mesh?

Using the TextureId property, the texture of a mesh can be changed without having to reupload the mesh. To do this, a new image will need to be uploaded to Roblox with the desired texture. The original texture image file can be obtained by exporting the mesh using the 'Export Selection' option in Roblox Studio. The image file will be saved alongside the exported .obj file.

The new texture can then be re-uploaded to Roblox as a Decal and its content ID can be applied to the mesh using the TextureId property.

How can I make a textured mesh?

A mesh can only be textured if the mesh has been UV mapped. UV mapping refers to the practice of projecting a texture map onto a mesh. This cannot be done using Roblox Studio and has to be done using an external 3D modelling application such as Blender.

方法

ApplyMesh

void

パラメータ

meshPart: Instance

戻り値

void

イベント