useAnimatedBendNormal

This commit is contained in:
NotAKidoS 2023-04-16 21:21:43 -05:00
parent a35e0e777f
commit a8ad814ac0
2 changed files with 10 additions and 1 deletions

View file

@ -200,7 +200,7 @@ internal class DesktopVRIKSystem : MonoBehaviour
DesktopVRIKMod.UpdateAllSettings();
}
void Update()
{
if (avatarVRIK == null) return;
@ -283,6 +283,9 @@ internal class DesktopVRIKSystem : MonoBehaviour
avatarIKSolver.IKPositionWeight = BodySystem.TrackingPositionWeight;
avatarIKSolver.locomotion.weight = _locomotionWeight;
bool useAnimatedBendNormal = _locomotionWeight <= 0f;
avatarIKSolver.leftLeg.useAnimatedBendNormal = useAnimatedBendNormal;
avatarIKSolver.rightLeg.useAnimatedBendNormal = useAnimatedBendNormal;
SetArmWeight(avatarIKSolver.leftArm, BodySystem.TrackingLeftArmEnabled && avatarIKSolver.leftArm.target != null);
SetArmWeight(avatarIKSolver.rightArm, BodySystem.TrackingRightArmEnabled && avatarIKSolver.rightArm.target != null);
SetLegWeight(avatarIKSolver.leftLeg, BodySystem.TrackingLeftLegEnabled && avatarIKSolver.leftLeg.target != null);
@ -294,6 +297,8 @@ internal class DesktopVRIKSystem : MonoBehaviour
avatarIKSolver.IKPositionWeight = 0f;
avatarIKSolver.locomotion.weight = 0f;
avatarIKSolver.leftLeg.useAnimatedBendNormal = false;
avatarIKSolver.rightLeg.useAnimatedBendNormal = false;
SetArmWeight(avatarIKSolver.leftArm, false);
SetArmWeight(avatarIKSolver.rightArm, false);
SetLegWeight(avatarIKSolver.leftLeg, false);

View file

@ -15,6 +15,10 @@ using UnityEngine;
Freddy (gmod)- Doesn't have any fingers, wristToPalmAxis & palmToThumbAxis needed to be set manually.
Small Cheese- Emotes are angled wrong due to maxRootAngle..???
Custom knee bend normal is needed for avatars that scale incredibly small. Using animated knee bend will cause
knees to bend in completely wrong directions. We turn it off though when in crouch/prone, as it can bleed
into animations.
Most other avatars play just fine.
**/