Size: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Fidcal (talk | contribs)
mNo edit summary
Fidcal (talk | contribs)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
The ''size'' spawnarg is used to setup a default [[CM|collision model]] for entities when they do not have a CM in either the model file or a separate .cm file.
The ''size'' spawnarg is used to setup a default [[CM|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]]


This spawnarg is '''only''' used when the spawnarg '''noclipmodel''' is set to zero. Making a dedicated collision model should be prefered over using this method.
''size'' has three dimensions X,Y,Z centred on the centre of the volume of the entity (NOT the entity origin.)


See [[noclipmodel]] for examples.
By default it creates a box. To create another shape, use the following spawnargs with the number of desired sides as the value:
 
* [[cylinder]], [[cone]]
 
'''''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.


{{spawnargs}}
{{spawnargs}}

Latest revision as of 15:52, 15 February 2009

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.