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.
요약
속성
- 병렬 읽기
Render both faces of polygons in the mesh.
- 숨김병렬 읽기
- 숨김병렬 읽기
- 숨김병렬 읽기
The MeshId is the content ID of the mesh that is to be displayed on the MeshPart.
- 복제되지 않음병렬 읽기
The level of detail used to render the MeshPart.
The texture applied to the MeshPart.
- 복제되지 않음병렬 읽기
Determines the level of detail the part's physics will adhere to its mesh.
- 복제되지 않음병렬 읽기
Determines the geometric representation used to compute aerodynamic forces and torques.
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 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).
- 복제되지 않음스크립팅할 수 없음병렬 읽기
메서드
Apply an angular impulse to the assembly.
Apply an impulse to the assembly at the assembly's center of mass.
Apply an impulse to the assembly at specified position.
- 병렬 쓰기
Returns whether the parts can collide with each other.
Checks whether you can set a part's network ownership.
- 병렬 쓰기
Returns a table of parts connected to the object by any kind of rigid joint.
Return all Joints or Constraints that is connected to this Part.
Returns the value of the Mass property.
- 병렬 쓰기
Returns the current player who is the network owner of this part, or nil in case of the server.
- 병렬 쓰기
Returns true if the game engine automatically decides the network owner for this part.
- 병렬 쓰기
Returns the base part of an assembly of parts.
Returns a table of all BasePart.CanCollide true parts that intersect with this part.
- 병렬 쓰기
Returns the linear velocity of the part's assembly at the given position relative to this part.
- 병렬 쓰기
Returns true if the object is connected to a part that will hold it in place (eg an BasePart.Anchored part), otherwise returns false.
Changes the size of an object just like using the Studio resize tool.
Sets the given player as network owner for this and all connected parts.
Lets the game engine dynamically decide who will handle the part's physics (one of the clients or the server).
- IntersectAsync(parts : Objects,collisionfidelity : Enum.CollisionFidelity,renderFidelity : Enum.RenderFidelity):Instance생성
Creates a new IntersectOperation from the overlapping geometry of the part and the other parts in the given array.
- SubtractAsync(parts : Objects,collisionfidelity : Enum.CollisionFidelity,renderFidelity : Enum.RenderFidelity):Instance생성
Creates a new UnionOperation from the part, minus the geometry occupied by the parts in the given array.
- UnionAsync(parts : Objects,collisionfidelity : Enum.CollisionFidelity,renderFidelity : Enum.RenderFidelity):Instance생성
Creates a new UnionOperation from the part, plus the geometry occupied by the parts in the given array.
Gets the pivot of a PVInstance.
Transforms the PVInstance along with all of its descendant PVInstances such that the pivot is now located at the specified CFrame.
이벤트
이벤트가 BasePart에서 상속되었습니다Fires when a part stops touching another part as a result of physical movement.
Fires when a part touches another part as a result of physical movement.
속성
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.
With MeshPart.DoubleSided disabled some leaves are missing since they are back facing the camera.
With MeshPart.DoubleSided enabled, both faces of the leaves are rendered.
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 Camera | Render Fidelity |
---|---|
Less than 250 studs | Highest |
250-500 studs | Medium |
500 or more studs | Lowest |
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.