$collisionmodel: Difference between revisions
Jump to navigation
Jump to search
Note:Jointed collision models use the QC Command $collisionjoints instead of $collisionmodel.
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
The [[QC Command]] [[$collisionmodel]] is used to setup the physbox, collision hull, or [[collision model]]. | |||
{{note|[[Jointed collision model]]s use the [[QC Command]] [[$collisionjoints]] instead of [[$collisionmodel]].}} | |||
* See also [[NPC Hull]]. | |||
* See also [[Physics and Ragdolls]]. | |||
$ | == Example Syntax== | ||
* | [[$collisionmodel]] "tree_deciduous_01a_physbox.smd" | ||
{ | |||
[[$mass]] 350.0 | |||
[[$concave]] | |||
} | |||
* Straight after $collisionmodel you specify the name of the .SMD to use as a collision model. | |||
* You should always create an efficient _physbox.smd rather than just using the _reference.smd as a collision model. | |||
==Options== | |||
; [[$mass]] <kilograms> | |||
* | : Manually set the mass, in kilograms, of the model. | ||
:* This is applicable when the object is a physics prop, rather than simply a static prop. Make certain to set this correctly, otherwise your object will behave unrealistically. | |||
; [[$automass]] | |||
* | : Automatically compute the mass of the model. | ||
:* Derived from the density/thickness of the material defined in [[$surfaceprops]] and/or [[prop_data]] and the volume of the [[$collisionmodel]] itself. | |||
; [[$masscenter]] <X Y Z offset?> | |||
: Override the center of mass, in local coords. | |||
; [[$inertia]] <scale?> | |||
: Inertia scale. | |||
; [[$damping]] <scale?> | |||
: Linear damping scale. | |||
; [[$rotdamping]] <scale?> | |||
: Rotational damping scale. | |||
; [[$drag]] <scale?> | |||
: Scales the air resistance. | |||
; [[$concave]] | |||
: The vphysics [[collision model]] is made up of individual separate convex hulls (separate pieces), and not just one big hull. | |||
:* If not set, it'll make a single convex hull out of whatever geometry you give it. | |||
[[Category:QC Commands]] | [[Category:QC Commands]] |
Revision as of 18:10, 30 March 2008
The QC Command $collisionmodel is used to setup the physbox, collision hull, or collision model.

- See also NPC Hull.
- See also Physics and Ragdolls.
Example Syntax
$collisionmodel "tree_deciduous_01a_physbox.smd" { $mass 350.0 $concave }
- Straight after $collisionmodel you specify the name of the .SMD to use as a collision model.
- You should always create an efficient _physbox.smd rather than just using the _reference.smd as a collision model.
Options
- $mass <kilograms>
- Manually set the mass, in kilograms, of the model.
- This is applicable when the object is a physics prop, rather than simply a static prop. Make certain to set this correctly, otherwise your object will behave unrealistically.
- $automass
- Automatically compute the mass of the model.
- Derived from the density/thickness of the material defined in $surfaceprops and/or prop_data and the volume of the $collisionmodel itself.
- $masscenter <X Y Z offset?>
- Override the center of mass, in local coords.
- $inertia <scale?>
- Inertia scale.
- $damping <scale?>
- Linear damping scale.
- $rotdamping <scale?>
- Rotational damping scale.
- $drag <scale?>
- Scales the air resistance.
- $concave
- The vphysics collision model is made up of individual separate convex hulls (separate pieces), and not just one big hull.
- If not set, it'll make a single convex hull out of whatever geometry you give it.