mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-15 20:10:20 +02:00
AnimInverseKinematics: renamed variable for extra style points
This commit is contained in:
parent
df21fffa4a
commit
b5a72225db
1 changed files with 2 additions and 2 deletions
|
@ -278,8 +278,8 @@ int AnimInverseKinematics::solveTargetWithCCD(const IKTarget& target, AnimPoseVe
|
|||
if (axisLength > MIN_AXIS_LENGTH) {
|
||||
// compute angle of rotation that brings tip closer to target
|
||||
axis /= axisLength;
|
||||
float cos_angle = std::min(std::max(glm::dot(leverArm, targetLine) / (glm::length(leverArm) * glm::length(targetLine)), -1.0f), 1.0f);
|
||||
float angle = acosf(cos_angle);
|
||||
float cosAngle = std::min(std::max(glm::dot(leverArm, targetLine) / (glm::length(leverArm) * glm::length(targetLine)), -1.0f), 1.0f);
|
||||
float angle = acosf(cosAngle);
|
||||
const float MIN_ADJUSTMENT_ANGLE = 1.0e-4f;
|
||||
if (angle > MIN_ADJUSTMENT_ANGLE) {
|
||||
// reduce angle by a fraction (for stability)
|
||||
|
|
Loading…
Reference in a new issue