Skip to main content

Rigidbody.SetDensity(number density)

Sets the mass based on the attached colliders assuming a constant density.

Parameters:

NameTypeDescription
densitynumber

Usage

---@type Rigidbody
local rigidbody;

---@type number
local density;


rigidbody.SetDensity(density)