Difference between revisions of "$boneflexdriver"

From Valve Developer Community
Jump to: navigation, search
(Update $boneflexdriver with new findings)
(I noticed that the Team Fortress 2 studiomdl reports a bone flex driver with 0 bytes, I need an example of this $boneflexdriver to see if it works in TF2)
Line 3: Line 3:
== Availability ==
== Availability ==
* [[Team Fortress 2]] {{confirm|Does it really work? [[Studiomdl]] reports a "bone flex driver 0 bytes" on each compile, hinting that its available.}}
* [[Alien Swarm]]
* [[Alien Swarm]]
* [[Portal 2]]
* [[Portal 2]]

Revision as of 11:21, 15 June 2018

$boneflexdriver is a QC command which enables driving a flex with a bone's animation. This is particularly useful in multiplayer games where you can't pack VDC files into the map, as you can still use flex animation. It is also critical to vertex animation.



$boneflexdriver <bone_name> <graph_axis> <flex_name> <start_offset> <time_factor>
The name of an existing bone that will host vertex animation for this model.
One of three values:
Links the target flex controller to the weight of the animation (much like a skeletal animation's). Controlled by the X-axis animation of the host bone.
Links the target flex controller to the current frame of vertex animation. Controlled by the Y-axis animation of the host bone.
Unknown function.
The name of the flex controller this command operates on. There are two sensible options:
  • <vca_name> (for tx)
  • multi_<vca_name> (for ty)
In both cases, <vca_name> is the name of the model's vcafile minus any file extension.
Adds a delay before the vertex animation starts.
The keyframe rate of the animation is multiplied by this value. It doesn't actually change the animation's duration however, making it of little use.


For vertex animation:

$boneflexdriver "flexAnimBone" tx "my_vca_name" 0 1
$boneflexdriver "flexAnimBone" ty "multi_my_vca_name" 0 1