# PhysicalProperties

## Overview

PhysicalProperties is a configuration object for defining how a BasePart reacts physically. It includes physical elements such as density, elasticity, and friction, which can be applied to individual parts through the CustomPhysicalProperties property.

Additionally, each physical property comes with a weight concept. When two parts contact each other, friction and elasticity are calculated by combining each part's values and weights, with the side having greater weight having more influence on the result. When weights are similar, a value that balances the characteristics of both parts is applied.

## Constructors

### new

Creates and returns a PhysicalProperties object with default physical settings defined for a specific material. The returned object has pre-applied values related to the material's density, friction, and elasticity.

#### Parameters

| `Enum.Material` InMaterial | Specifies the material that will form the basis of the PhysicalProperties, and the object is created based on the density, friction, and elasticity values defined for that material. |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

#### Return

| `PhysicalProperties` | The created PhysicalProperties. |
| -------------------- | ------------------------------- |

#### Code Samples

```lua
local CustomProperties = PhysicalProperties.new(Enum.Material.Wood)
```

### new

Creates and returns a PhysicalProperties object with default physical settings defined for a specific material. The returned object has pre-applied values related to the material's density, friction, and elasticity.

#### Parameters

| `number` InMaterial | Specifies the material that will form the basis of the PhysicalProperties, and the object is created based on the density, friction, and elasticity values defined for that material. |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `number` arg2       | Specifies the material's friction. Affects sliding when in contact with other parts.                                                                                                  |
| `number` arg3       | Specifies the material's elasticity. Affects the degree of rebound during collisions.                                                                                                 |

#### Return

| `PhysicalProperties` | The created PhysicalProperties. |
| -------------------- | ------------------------------- |

#### Code Samples

```lua
local CustomProperties = PhysicalProperties.new(Enum.Material.Wood)
```

### new

Creates and returns a PhysicalProperties object based on the specified density, friction, and elasticity values. This allows detailed configuration of a part's physical characteristics.

#### Parameters

| `number` InDensity          | Specifies the material's density. Higher values increase the part's mass and require more force to accelerate.                               |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `number` InFriction         | Specifies the material's friction. Affects sliding when in contact with other parts.                                                         |
| `number` InElasticity       | Specifies the material's elasticity. Affects the degree of rebound during collisions.                                                        |
| `number` InFrictionWeight   | Specifies the weight used in friction calculations. Determines the influence ratio of the friction value when interacting with other parts.  |
| `number` InElasticityWeight | Specifies the weight used in elasticity calculations. Determines how much the elasticity value is reflected in the result during collisions. |

#### Return

| `PhysicalProperties` | The created PhysicalProperties. |
| -------------------- | ------------------------------- |

#### Code Samples

```lua
local Density = 0.7
local Friction = 0.3
local Elasticity  = 0.5
local FrictionWeight = 1
local ElasticityWeight = 1

local CustomProperties = PhysicalProperties.new(Density, Friction, Elasticity, FrictionWeight, ElasticityWeight)
```

## Properties

### Density

`number`

Specifies the material's density. Higher values increase the part's mass and require more force to accelerate.

Configurable values are limited to 0 to 1000, and values exceeding the range are automatically corrected by the system.

#### Code Samples

### Elasticity

`number`

Specifies the material's elasticity. Affects the degree of rebound during collisions.

Configurable values are limited to 0 to 1, and values exceeding the range are automatically corrected by the system.

#### Code Samples

### ElasticityWeight

`number`

Specifies the weight used in elasticity calculations. Determines how much the elasticity value is reflected in the result during collisions.

The final elasticity value is calculated based on the weights of both parts, with higher values meaning that part's rebound characteristics are applied more strongly.

#### Code Samples

### Friction

`number`

Specifies the material's friction. Affects sliding when in contact with other parts.

Configurable values are limited to 0 to 2, and values exceeding the range are automatically corrected by the system.

#### Code Samples

### FrictionWeight

`number`

Specifies the weight used in friction calculations. Determines the influence ratio of the friction value when interacting with other parts.

When two parts contact, the final friction value is calculated based on each weight, with higher values meaning that part's friction characteristics have greater influence.

#### Code Samples

## Methods

## Events


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.overdare.com/development/api-reference/datatype/physicalproperties.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
