SetDensity
7/14/25Less than 1 minute
Rigidbody.SetDensity(number density)
Sets the mass based on the attached colliders assuming a constant density.
Parameters:
Name | Type | Description |
---|---|---|
density | number |
Usage
---@type Rigidbody
local rigidbody;
---@type number
local density;
rigidbody.SetDensity(density)