Noclipmodel: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
(rem needless headline)
m (typo)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
When the ''noclipmodel'' spawnarg is set to zero (default: "0"), default [[CM|collision models]] can be created by using one set of the following spawnargs:
A clip model is a simplified shape used to check for collisions with other objects in the gameworld. It can be disabled by adding the spawnarg and value:


* [[mins]],[[maxs]] '''or'''
'''''noclipmodel 1'''''
* [[size]]


By default this creates a box. To create another shape, use the following spawnargs with the number of desired sides as the value:
By default, ''noclipmodel'' is set to 0. There are few situations where you need to set it to 1:


* [[cylinder]], [[cone]]
* If you want an object to start non-solid and possibly become solid later in the game then use '''''solid 0''''' instead (see [[solid]])
* For a permanently non-solid object there is a tiny performance gain using ''noclipmodel 1'' instead so no collision-checking takes place but see notes below.


If neither ''mins/maxs'' nor ''size'' are defined, the engine tries to load the clipmodel from the .ase, .lwo or .cm file itself.
NOTES:


== Examples ==
The following will be disabled if ''noclipmodel'' is set to 1.


"noclipmodel" "0"
Spawnargs:
"size"        "8 20 32"
[[size]]
[[mins]]
[[maxs]]
[[clipmodel]]


This would create a box of 8, 20 and 32 units in X, Y and Z direction.
Entities:
All moveables
target_set_frobable


----
Other:
 
All clip-based stims
"noclipmodel" "0"
"size"        "8 20 32"
"cylinder"    "5"
 
This 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"
 
This would create a 7-sided cone of 8, 20 and 32 units in X, Y and Z direction.


{{spawnargs}}
{{spawnargs}}

Latest revision as of 02:16, 16 January 2022

A clip model is a simplified shape used to check for collisions with other objects in the gameworld. It can be disabled by adding the spawnarg and value:

noclipmodel 1

By default, noclipmodel is set to 0. There are few situations where you need to set it to 1:

  • If you want an object to start non-solid and possibly become solid later in the game then use solid 0 instead (see solid)
  • For a permanently non-solid object there is a tiny performance gain using noclipmodel 1 instead so no collision-checking takes place but see notes below.

NOTES:

The following will be disabled if noclipmodel is set to 1.

Spawnargs: size mins maxs clipmodel

Entities: All moveables target_set_frobable

Other: All clip-based stims