density
The density of the object, in kilograms per square meter.
Declaration
var density: CGFloat { get set }Mentioned in
Discussion
The actual unit is arbitrary as long as relative masses of objects are consistent throughout the game.
The mass and density properties are interrelated. When you change the value of either property, the other property’s value is automatically recalculated to be consistent.
The default value is 1.0.