@@ -137,9 +137,9 @@ public void ReInitialize(Animator OriginalAnimator)
137137
138138 PutAvatarIntoTPose ( Animator ) ;
139139
140- HumanPoseHandler poseHandler = new HumanPoseHandler ( Animator . avatar , Animator . transform ) ;
141140 HumanPose Tpose = new HumanPose ( ) ;
142- poseHandler . GetHumanPose ( ref Tpose ) ;
141+ Tpose . muscles = new float [ 95 ] ;
142+ Basis . Scripts . Networking . NetworkedAvatar . BasisHumanoidMuscleConversion . ExtractMuscles ( Animator , Tpose . muscles ) ;
143143
144144 LeftThumb = new float [ 4 ] ; Array . Copy ( Tpose . muscles , 55 , LeftThumb , 0 , 4 ) ;
145145 LeftIndex = new float [ 4 ] ; Array . Copy ( Tpose . muscles , 59 , LeftIndex , 0 , 4 ) ;
@@ -161,7 +161,7 @@ public void ReInitialize(Animator OriginalAnimator)
161161 {
162162 float x = - 1f + xi * increment ;
163163 float y = - 1f + yi * increment ;
164- PoseGrid [ xi * GridHeight + yi ] = SetAndRecordPose ( x , y , poseHandler , ref Tpose , allTransforms , allHasProximal ) ;
164+ PoseGrid [ xi * GridHeight + yi ] = SetAndRecordPose ( x , y , Animator , ref Tpose , allTransforms , allHasProximal ) ;
165165 }
166166 }
167167
@@ -413,7 +413,7 @@ void AssignFinger(ref Quaternion[] finger)
413413
414414 private bool [ ] AggregateHasProximal ( params bool [ ] [ ] hasProximalArrays ) => hasProximalArrays . SelectMany ( h => h ) . ToArray ( ) ;
415415
416- public BasisPoseData SetAndRecordPose ( float fillValue , float Splane , HumanPoseHandler poseHandler , ref HumanPose pose , Transform [ ] allTransforms , bool [ ] allHasProximal )
416+ public BasisPoseData SetAndRecordPose ( float fillValue , float Splane , Animator animator , ref HumanPose pose , Transform [ ] allTransforms , bool [ ] allHasProximal )
417417 {
418418 SetMuscleData ( ref LeftThumb , fillValue , Splane ) ;
419419 SetMuscleData ( ref LeftIndex , fillValue , Splane ) ;
@@ -439,7 +439,9 @@ public BasisPoseData SetAndRecordPose(float fillValue, float Splane, HumanPoseHa
439439 Array . Copy ( RightRing , 0 , pose . muscles , 87 , 4 ) ;
440440 Array . Copy ( RightLittle , 0 , pose . muscles , 91 , 4 ) ;
441441
442- poseHandler . SetHumanPose ( ref pose ) ;
442+ // Apply muscles via Burst job (replaces HumanPoseHandler.SetHumanPose)
443+ Basis . Scripts . Networking . NetworkedAvatar . BasisHumanoidMuscleConversion . ApplyMuscles (
444+ animator , pose . muscles , pose . bodyPosition , pose . bodyRotation ) ;
443445
444446 Current = RecordCurrentPose ( allTransforms , allHasProximal ) ;
445447 return Current ;
0 commit comments