$limitrotation

From Valve Developer Community
Jump to navigation Jump to search
Wikipedia - Letter.png
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
Dead End - Icon.png
This article has no Wikipedia icon links to other VDC articles. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024

By default, all bones will rotate through the shortest path - anything less than 180 - when blending between any two or more unrelated animations that are overlap with the bones well out of phase. This can cause problems with bones that can legally be posed at angles greater than 180 degrees away from each other, such as in two different animations or a hyper flexible wrist or hinge, but they shouldn't rotate through the shortest arc but through some less than 360 arc.

Setting a bone to $limitrotation causes studiomdl to calculate the rotation domain of the bone as specified from the source animations and calculates a "mid point" rotation that all rotations compare against, which allows for greater then 180 degree rotations.

Syntax

$limitrotation (bone name)

Example

$limitrotation "Antlion_Guard.claw1_L"
$limitrotation "Antlion_Guard.claw2_L"
$limitrotation "Antlion_Guard.pelvis"