Mass: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
== Description ==
The ''mass'' spawnarg sets the mass of an entity. This is only useful for moveables; e.g. it's not necessary for static entities.
 
The ''mass'' spawnarg sets the mass of an entity. This is only useful for moveables, e.g. not necessary for static entities.


The mass is specified in '''kilograms''' and should be roughly the real mass of such an item. Realistic masses are the foundation of believable physics in game.
The mass is specified in '''kilograms''' and should be roughly the real mass of such an item. Realistic masses are the foundation of believable physics in game.


Note: you cannot enter zero mass values, the code will not accept this. The reason is that the inverse of the mass is needed for physics calculations, and zero masses would result in divisions by zero.
''Note:'' you cannot enter zero mass values, the code will not accept this. The reason is that the inverse of the mass is needed for physics calculations, and zero masses would result in divisions by zero.


== Examples ==
== Examples ==
Line 13: Line 11:
  "mass"      "0.1"
  "mass"      "0.1"


to denote it weighs 100 gr.
to denote it weighs 100 grams.


{{spawnargs}}
{{spawnargs}}

Latest revision as of 08:27, 16 June 2008

The mass spawnarg sets the mass of an entity. This is only useful for moveables; e.g. it's not necessary for static entities.

The mass is specified in kilograms and should be roughly the real mass of such an item. Realistic masses are the foundation of believable physics in game.

Note: you cannot enter zero mass values, the code will not accept this. The reason is that the inverse of the mass is needed for physics calculations, and zero masses would result in divisions by zero.

Examples

For instance, a carrot would have

"mass"       "0.1"

to denote it weighs 100 grams.