Skip to content

Data type

PhysicalProperties

Official docs ↗

Describes properties that affect the physical behavior of a BasePart.

About PhysicalProperties

The PhysicalProperties data type describes several physical properties of a BasePart: Density, Elasticity, and Friction. It is used in the similarly-named BasePart.CustomPhysicalProperties property.

Weighting Behavior

PhysicalProperties also provides weightings properties, ElasticityWeight and FrictionWeight. When two parts interact, the friction and elasticity between them are determined in the same way by the following pairwise weighted average function:

local function getActualFriction(partA, partB)
    return (partA.Friction * partA.FrictionWeight + partB.Friction * partB.FrictionWeight) / (partA.FrictionWeight + partB.FrictionWeight)
end

Although the formula above refers to the Friction and FrictionWeight of two parts, A and B, the formula is used in the same manner when determining Elasticity. Generally, when the weight of A is much greater than that of B, the actual value will be closer to A. If the weights are similar, the actual value will be close to the midpoint between their individual values.

Constructors 4

  • PhysicalProperties.new(material: Material)Returns a PhysicalProperties with the default properties for the given material.
  • PhysicalProperties.new(density: number, friction: number, elasticity: number)Returns a PhysicalProperties with the specified density, friction, and elasticity.
  • PhysicalProperties.new(density: number, friction: number, elasticity: number, frictionWeight: number, elasticityWeight: number)Creates a PhysicalProperties container with the specified density, friction, elasticity, weight of friction, and weight of elasticity.
  • PhysicalProperties.new(density: number, friction: number, elasticity: number, frictionWeight: number, elasticityWeight: number, acousticAbsorption: number)Creates a PhysicalProperties container with the specified density, friction, elasticity, weight of friction, weight of elasticity, and acoustic absorption.

Properties 6

  • AcousticAbsorption: numberA value between 0 and 1 denoting how absorbent the material is to AudioEmitters.

    A value between 0 and 1 denoting how absorbent the material is to AudioEmitters. When using acoustic simulation, surfaces with higher absorption will result in less reverb than surfaces with lower absorption.

    Note that this does not affect the degree to which audio transmits through surfaces; for that, see Density.

  • Density: numberThe mass per unit volume of the part.

    Density is defined as the amount of mass per unit volume. The more dense a part is, the more force it takes to accelerate it. Acceptable range is 0.0001 to 100.0 and values outside this range will be clamped.

    When using acoustic simulation, parts with higher density will muffle occluded AudioEmitters more.

  • Friction: numberThe deceleration of the part when rubbing against another part.

    Friction is defined as the force that opposes the relative lateral motion of two solid surfaces in contact. The greater the friction on a part, the quicker it will decelerate when it rubs against another part with friction. Acceptable range is 0.0 to 2.0 and values outside this range will be clamped.

  • Elasticity: numberThe amount of energy retained when colliding with another part.

    Elasticity refers to a part's tendency to retain energy when colliding with another part. An Elasticity of 1 indicates that the part bounces with the same energy it had before a collision. Acceptable range is 0.0 to 1.0 and values outside this range will be clamped.

  • FrictionWeight: numberThe importance of the part's Friction property when calculating the friction with the colliding part.

    The friction weight of two parts rubbing together creates a ratio used to calculate the actual friction between the two parts. The higher a part's FrictionWeight, the more its Friction is used. Acceptable range is 0.0 to 100.0 and values outside this range will be clamped.

  • ElasticityWeight: numberThe importance of the part's Elasticity property when calculating the elasticity with the colliding part.

    The elasticity weight of two parts colliding creates a ratio used to calculate the actual elasticity between the two parts. The higher a part's ElasticityWeight, the more its Elasticity is used. Acceptable range is 0.0 to 100.0 and values outside this range will be clamped.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.