From 9a0576cfa06d37eb0c1b35f57757737ac61288b8 Mon Sep 17 00:00:00 2001 From: "pafuhana@hotmail.co.jp" Date: Sat, 12 Aug 2023 01:48:14 +0900 Subject: [PATCH] Fix Issue : AdjustByAngleLimit is not working properly #99 --- .../Source/KawaiiPhysics/Private/AnimNode_KawaiiPhysics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/KawaiiPhysics/Source/KawaiiPhysics/Private/AnimNode_KawaiiPhysics.cpp b/Plugins/KawaiiPhysics/Source/KawaiiPhysics/Private/AnimNode_KawaiiPhysics.cpp index 3fa30d0..0b9a480 100644 --- a/Plugins/KawaiiPhysics/Source/KawaiiPhysics/Private/AnimNode_KawaiiPhysics.cpp +++ b/Plugins/KawaiiPhysics/Source/KawaiiPhysics/Private/AnimNode_KawaiiPhysics.cpp @@ -855,7 +855,7 @@ void FAnimNode_KawaiiPhysics::AdjustByAngleLimit(FComponentSpacePoseContext& Out if (AngleOverLimit > 0.0f) { - BoneDir = BoneDir.RotateAngleAxis(-AngleOverLimit, Axis); + BoneDir = BoneDir.RotateAngleAxis(-AngleOverLimit, Axis.GetSafeNormal()); Bone.Location = BoneDir * (Bone.Location - ParentBone.Location).Size() + ParentBone.Location; } }