Size

From The DarkMod Wiki
Revision as of 15:52, 15 February 2009 by Fidcal (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The size spawnarg is used to setup a default collision model for entities when they do not have a CM in either the model file or a separate .cm file. If used, it also defines the size of the frob box (see the item within the section Frobbing#Entity Settings

size has three dimensions X,Y,Z centred on the centre of the volume of the entity (NOT the entity origin.)

By default it creates a box. To create another shape, use the following spawnargs with the number of desired sides as the value:

Examples:

"size"        "8 20 32"

The above would create a box of 8, 20 and 32 units in X, Y and Z direction.


"noclipmodel" "0"
"size"        "8 20 32"
"cylinder"    "5"

The above would create a 5-sided cylinder of 8, 20 and 32 units in X, Y and Z direction.


"noclipmodel" "0"
"size"        "8 20 32"
"cone"        "7"

The above would create a 7-sided cone of 8, 20 and 32 units in X, Y and Z direction.


Notes:

This spawnarg is disabled if the spawnarg noclipmodel is set to 1, or if mins and maxs are defined.

Making a dedicated collision model should always be prefered over using this method.