Class
PartOperation
An abstract class that all parts based on solid modeling inherit from.
An abstract class that all parts based on solid modeling inherit from.
Properties 4#
RenderFidelityRenderFidelity | The level of detail used to render the solid modeled part.ReadSafe |
SmoothingAnglefloat | An angle in degrees which affects the smooth shading of a solid modeled part.ReadSafe |
TriangleCountint | The number of polygons in this solid model.Write: RobloxEngineSecurityReadSafe |
UsePartColorboolean | Sets whether the PartOperation can be recolored using inherited
color properties.ReadSafe |
RenderFidelity: RenderFidelity#
ReadSafe
This property determines the level of detail that the solid modeled part
will be shown in. It can be set to the possible values of the
RenderFidelity enum except for
Performance.
The default value is Automatic, meaning
the part's detail is based on its distance from the camera as outlined in
the following table.
| Distance From Camera | Render Fidelity |
|---|---|
| Less than 250 studs | Highest |
| 250-500 studs | Medium |
| 500 or more studs | Lowest |
SmoothingAngle: float#
ReadSafe
This property represents an angle in degrees for a threshold value between face normals on a solid modeled part. If the normal difference is less than the value, normals will be adjusted to smooth the difference. While a value between 30 and 70 degrees usually produces a good result, values between 90 and 180 are not recommended as they may cause a "shadowing" effect on unions with sharp edges.
Note that smoothing does not affect the normals between different materials or different colors.
TriangleCount: int#
Write: RobloxEngineSecurityReadSafe
The number of polygons in this solid model.
UsePartColor: boolean#
ReadSafe
Sets whether the PartOperation can be recolored using the
BasePart.Color or BasePart.BrickColor properties. When
true, the entire union will be colored as per Color
or BrickColor. When false, the parts in the
union will maintain their original colors from before the onion operation
was performed.
Methods 1#
| SubstituteGeometry | Substitutes the geometry of this PartOperation with the geometry
of another PartOperation. |
SubstituteGeometry(source: Instance): ()#
Substitutes the geometry of this PartOperation with the geometry
of another PartOperation. This makes it easier to utilize the
geometry of a solid modeling operation like
UnionAsync(),
SubtractAsync(), or
IntersectAsync() but maintain
properties, attributes, tags, and children of the main part such as
Attachments, Constraints,
ParticleEmitters, light objects, decals, and more.
This approach also circumvents the potential "flicker" of completely
replacing the original PartOperation with another.
Note that if you're calling this method on a PartOperation with
child Attachments or Constraints,
you should calculate the affected instances with
CalculateConstraintsToPreserve(),
then drop those whose recommended parent is nil.
| Name | Type | Default | Description |
|---|---|---|---|
source | Instance | The PartOperation whose geometry will substitute the geometry
of this PartOperation. |
Returns
()
Inherited members#
Inherited from TriangleMeshPart 4
Properties (4)
CollisionFidelity, CollisionPrecision, FluidFidelity, MeshSize
Inherited from BasePart 106
Properties (69)
Anchored, AssemblyAngularVelocity, AssemblyCenterOfMass, AssemblyLinearVelocity, AssemblyMass, AssemblyRootPart, AudioCanCollide, BackParamA, BackParamB, BackSurface, BackSurfaceInput, BottomParamA, BottomParamB, BottomSurface, BottomSurfaceInput, BrickColor, brickColor, CanCollide, CanQuery, CanTouch, CastShadow, CenterOfMass, CFrame, CollisionGroup, CollisionGroupId, Color, CurrentPhysicalProperties, CustomPhysicalProperties, Elasticity, EnableFluidForces, ExtentsCFrame, ExtentsSize, Friction, FrontParamA, FrontParamB, FrontSurface, FrontSurfaceInput, LeftParamA, LeftParamB, LeftSurface, LeftSurfaceInput, LocalTransparencyModifier, Locked, Mass, Massless, Material, MaterialVariant, Orientation, PivotOffset, Position, ReceiveAge, Reflectance, ResizeableFaces, ResizeIncrement, RightParamA, RightParamB, RightSurface, RightSurfaceInput, RootPriority, Rotation, RotVelocity, Size, SpecificGravity, TopParamA, TopParamB, TopSurface, TopSurfaceInput, Transparency, Velocity
Methods (32)
AngularAccelerationToTorque, ApplyAngularImpulse, ApplyImpulse, ApplyImpulseAtPosition, BindToCollisionSummaries, BreakJoints, breakJoints, CanCollideWith, CanSetNetworkOwnership, GetClosestPointOnSurface, GetConnectedParts, GetJoints, GetMass, getMass, GetNetworkOwner, GetNetworkOwnershipAuto, GetNoCollisionConstraints, GetRenderCFrame, GetRootPart, GetTouchingParts, GetVelocityAtPosition, IntersectAsync, IsGrounded, MakeJoints, makeJoints, Resize, resize, SetNetworkOwner, SetNetworkOwnershipAuto, SubtractAsync, TorqueToAngularAcceleration, UnionAsync
Events (5)
LocalSimulationTouched, OutfitChanged, StoppedTouching, Touched, TouchEnded
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild