$ikautoplaylock: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Copied and edited from CaptainBigButt's post: https://web.archive.org/web/20160608040725/https://facepunch.com/showthread.php?t=1439159)
(Deleted the previous nonsense and copied the description of iklock inputs from the $ikchain)
Line 1: Line 1:
Before the [[$sequence|autoplay sequence]]s are run, the specified [[$ikchain]] is locked in place wherever it happens to be. This is useful for locking the feet in place in case there are any pelvis motions on autoplay head turns or chest turns.  
Automatically applies <code>iklock</code> to all [[$sequence|sequences]] with <code>autoplay</code> option. See [[$ikchain]].


== Syntax ==
== Syntax ==


  $ikautoplaylock <chain name> <pos lock> <angle lock>
  $ikautoplaylock (ikchain_name) <lock_position> <inherit_rotation>
The <pos lock> value dictates how high the chain is off the ground. Generally values between 0-1 are acceptable enough, but you can go higher or go lower into the negatives if need be.
* <code>ikchain_name</code> : The name of the $ikchain that the rule will apply to.
The <angle lock> value can be left untouched (or even at 0). This controls the rotation of the chain and isn't really necessary.
* <code>lock_position</code> : the weight of the lock is a floating point value from 0.0 to 1.0. Sets how strongly the chain should maintain its position.
 
* <code>inherit_rotation</code> : the weight of rotation inheritance from the chain is a floating point value from 0.0 to 1.0. Sets how much the end of the chain should inherit its rotation.
{{note|The value for rotation is backwards from the position. To lock both of them, set the lock weights to "1 0"; to let both of them freely move, set them to "0 1" (which is pointless, don’t do the iklock in this case, but you get the idea).}}
{{note|The command can take values beyond 0 and 1, but you shouldn't use it if you don't know what you're doing.}}
== Example ==
== Example ==


  '''$ikautoplaylock rfoot 1.0 0.1'''
  '''$ikautoplaylock rfoot 1.0 0.1'''
  '''$ikautoplaylock lfoot 1.0 0.1'''
  '''$ikautoplaylock lfoot 1.0 0.1'''
$animation a_pose_neutral "CT_body_poses" frames 0 0


[[Category:QC Commands|ikautoplaylock]]__NOTOC__
[[Category:QC Commands|ikautoplaylock]]__NOTOC__

Revision as of 08:28, 11 May 2025

Automatically applies iklock to all sequences with autoplay option. See $ikchain.

Syntax

$ikautoplaylock (ikchain_name) <lock_position> <inherit_rotation>
  • ikchain_name : The name of the $ikchain that the rule will apply to.
  • lock_position : the weight of the lock is a floating point value from 0.0 to 1.0. Sets how strongly the chain should maintain its position.
  • inherit_rotation : the weight of rotation inheritance from the chain is a floating point value from 0.0 to 1.0. Sets how much the end of the chain should inherit its rotation.
Note.pngNote:The value for rotation is backwards from the position. To lock both of them, set the lock weights to "1 0"; to let both of them freely move, set them to "0 1" (which is pointless, don’t do the iklock in this case, but you get the idea).
Note.pngNote:The command can take values beyond 0 and 1, but you shouldn't use it if you don't know what you're doing.

Example

$ikautoplaylock rfoot 1.0 0.1
$ikautoplaylock lfoot 1.0 0.1