$jointconstrain
Jump to navigation
Jump to search
The QC Command $jointconstrain is used to set the limit of a joint's movement when compiling the $collisionmodel.
Syntax
$jointconstrain <bone_name> <axis> <allow_option> <min_angle> <max_angle> <friction>
where
- <bone_name>
- Todo: is the name of the 'child' bone as opposed to the 'parent' bone of the joint? - see example.
- <axis>
- specifies either the X, Y, or Z axis of rotation.
- <allow_option>
- can be one of three values:
- Free : ensures the joint can move between a <min_angle> of -360 and a <max_angle> of 360, with a selectable <friction>. Ignores user specified <min_angle> and <max_angle> values.
- Fixed : ensures the joint does not move at all. <min_angle>, <max_angle> and <friction> values are effectively locked to "0".
- Limit : ensures the joint is completely customizable. The user must specify <min_angle>, <max_angle> and <friction> values.
- <min_angle>
- specifies the minimum angle of rotation about <axis> in degrees. (No lower than -360).
- <max_angle>
- specifies the maximum angle of rotation about <axis> in degrees. (No higher than 360).
- <friction>
- specifies the Friction value Todo: scale? integer?.
Example
For example, to constrain the movement of joint_spine within a range of 20 to 100 degrees on the X-axis, with a friction of 0.20:
$jointconstrain "joint_spine" x limit 20.00 100.00 0.20.