Skip to content

Commit 91bf25c

Browse files
committed
changed the is left handle
1 parent 14a5d93 commit 91bf25c

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

Basis/Packages/com.basis.framework/IK/BasisArmBendLookup.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public struct BasisArmBendLookup
2222
/// Z = forward/back (positive = forward)
2323
/// Values are bend direction vectors (where the elbow should point).
2424
/// </summary>
25-
public static Vector3[] GenerateDefaultTable(bool isLeft)
25+
public static Vector3[] GenerateDefaultTable()
2626
{
2727
var table = new Vector3[TotalEntries];
2828
float step = 2f / (GridSize - 1);
@@ -52,8 +52,8 @@ public static Vector3[] GenerateDefaultTable(bool isLeft)
5252
bendDir = Vector3.Lerp(bendDir, new Vector3(0f, -0.5f, -1f), upness * 0.5f);
5353

5454
// When hand is across body (inward), elbow goes outward and down
55-
float inwardness = Mathf.Clamp01(isLeft ? x : -x);
56-
bendDir = Vector3.Lerp(bendDir, new Vector3(isLeft ? -1f : 1f, -0.5f, 0f), inwardness * 0.4f);
55+
float inwardness = Mathf.Clamp01(-x);
56+
bendDir = Vector3.Lerp(bendDir, new Vector3(1f, -0.5f, 0f), inwardness * 0.4f);
5757

5858
// When hand is behind, elbow goes up
5959
float behindness = Mathf.Clamp01(-z);

Basis/Packages/com.basis.framework/IK/BasisFullBodyIK.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3085,11 +3085,10 @@ public override BasisFullIKConstraintJob Create(Animator animator, ref BasisFull
30853085
GenerateHeadToSpine(animator, ref job, ref data);
30863086
GenerateChestToHead(animator, ref job, ref data);
30873087

3088-
// Generate arm bend lookup tables
3089-
var leftTable = BasisArmBendLookup.GenerateDefaultTable(true);
3090-
var rightTable = BasisArmBendLookup.GenerateDefaultTable(false);
3091-
job.ArmBendLookupLeft = new NativeArray<Vector3>(leftTable, Allocator.Persistent);
3092-
job.ArmBendLookupRight = new NativeArray<Vector3>(rightTable, Allocator.Persistent);
3088+
// Generate arm bend lookup tables. The sampler mirrors X per-arm, so one table serves both.
3089+
var bendTable = BasisArmBendLookup.GenerateDefaultTable();
3090+
job.ArmBendLookupLeft = new NativeArray<Vector3>(bendTable, Allocator.Persistent);
3091+
job.ArmBendLookupRight = new NativeArray<Vector3>(bendTable, Allocator.Persistent);
30933092
job.HasArmBendLookup = true;
30943093

30953094
var cacheBuilder = new AnimationJobCacheBuilder();

0 commit comments

Comments
 (0)