$collisionjoints: Difference between revisions
Jump to navigation
Jump to search
Tip:Use
Tip:If your model has no moving parts that need to collide, use
Warning:Collision meshes should be extremely low-poly in comparison to reference meshes, and even lod meshes. See collision mesh.
m (cat fix) |
m (→Options) |
||
| Line 35: | Line 35: | ||
; <code>$jointmassbias <[[string]]|bone> <[[float]]|bias></code> | ; <code>$jointmassbias <[[string]]|bone> <[[float]]|bias></code> | ||
: Mass is automatically distributed by volume, this lets you bias it per-bone. | : Mass is automatically distributed by volume, this lets you bias it per-bone. | ||
:{{todo|Difference from a [[weightmap]].}} | :{{todo|Difference from a [[$weightmap]].}} | ||
; <code>$noselfcollisions</code> | ; <code>$noselfcollisions</code> | ||
: Disables collisions between bones in the same collision model for performance. | : Disables collisions between bones in the same collision model for performance. | ||
Revision as of 05:39, 30 April 2008
The QC command $collisionjoints is used to embed an animated and/or physically-simulated collision mesh in a model, for use in VPhysics calculations. It's most often used for ragdolls, but also works with canned animations.
vcollide_wireframe 1 to view collision meshes in-game.$collisionmodel.Syntax
$collisionjoints <collision mesh SMD> { <options> }
Options
- All
$collisionmodeloptions, except$concave - This type of collision mesh is always concave...otherwise how could it be animated?
- $rootbone <string|bone>
- Overrides the SMD's root bone.
- Todo: Purpose.
- $jointskip <string|bone>
- Eliminates a joint in the skeleton that you don't want to use in collisions.
$jointmerge <string|bone1> <string|bone2>- Merges the vertex assignments for two joints.
$jointconstrain <string|bone> <axis> <allow_option> <min_angle> <max_angle> <friction>- Limits of the a bone's movement relative to its parent bone. See $jointconstrain for a full description.
$jointinertia <int|scale>- Per-bone
$inertia. $jointdamping <int|scale>- Per-bone
$damping. $jointrotdamping <int|scale>- Per-bone
$rotdamping. $jointmassbias <string|bone> <float|bias>- Mass is automatically distributed by volume, this lets you bias it per-bone.
- Todo: Difference from a $weightmap.
$noselfcollisions- Disables collisions between bones in the same collision model for performance.
Warning:Results in arms clipping through torsos and other weirdness if used improperly!$jointcollide <string|bone1> <string|bone2>- If any
$jointcollidepairs are specified, only those joints collide with each other. $animatedfriction <animation_name?>- Used to animate the amount of friction on joints over time.
Example
$collisionjoints "bip01_phys.smd" { $mass 115.0 $inertia 2.00 $damping 0.01 $rotdamping 0.40 $rootbone "bip01_pelvis" $jointmerge "bip01_pelvis" "bip01_spine" $jointmassbias "bip01_l_arm2" 2.00 $jointconstrain "bip01_l_arm2" x limit 0.00 0.00 0.00 $jointconstrain "bip01_l_arm2" y limit 0.00 0.00 0.00 $jointconstrain "bip01_l_arm2" z limit -120.00 4.00 0.20 $jointrotdamping "bip01_head" 5.00 $jointconstrain "bip01_head" x limit -20.00 20.00 0.00 $jointconstrain "bip01_head" y limit -25.00 25.00 0.04 $jointconstrain "bip01_head" z limit -13.00 30.00 0.04 }