Noclipmodel: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
(add order of evaluation)
m (typo)
 
(2 intermediate revisions by one other user 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]]


The '''size''' spawnarg is only used when '''mins''' and '''maxs''' are not defined.
By default, ''noclipmodel'' is set to 0. There are few situations where you need to set it to 1:


By default this creates a box. To create another shape, use the following spawnargs with the number of desired sides as the value:
* 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.


* [[cylinder]], [[cone]]
NOTES:


If neither ''mins/maxs'' nor ''size'' are defined, the engine tries to load the clipmodel from the .ase, .lwo or .cm file itself.
The following will be disabled if ''noclipmodel'' is set to 1.  


== Examples ==
Spawnargs:
[[size]]
[[mins]]
[[maxs]]
[[clipmodel]]


"noclipmodel" "0"
Entities:
"size"        "8 20 32"
All moveables
target_set_frobable


This would create a box of 8, 20 and 32 units in X, Y and Z direction.
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