Disable foot IK on pose playables and add ball pose
- PlayerPoseController: add applyFootIK toggle (default off) and apply it to each pose playable so straight-knee idles render straight; Mecanim foot IK was bending the knees to plant the feet (162° instead of 180°). - Add Pose_Ball / Paintman-Ball animation and reorder the pose list. - Move StraightenKneesTool editor utility under Assets/Unused/Editor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
5dd35dd0f9
commit
080b2a1c39
10 files changed
+11609
-82
No files matched your search
@@ -58,6 +58,11 @@ public partial class PlayerPoseController : MonoBehaviour
|
||||
[Min(0f)]
|
||||
[SerializeField] private float ceilingOffsetSpeed = 4f;
|
||||
|
||||
[Tooltip("Apply Mecanim foot IK to the played humanoid clips. Off (default) plays each pose exactly as " +
|
||||
"authored. On bends the knees to plant the feet on the IK goal, which makes a straight-knee idle " +
|
||||
"render visibly bent even when the clip's Lower Leg Stretch muscle is fully straight.")]
|
||||
[SerializeField] private bool applyFootIK = false;
|
||||
|
||||
private PlayerCharacterController _player;
|
||||
private Animator _animator;
|
||||
private string _graphName; // cached so building the graph allocates no string from the Update path
|
||||
@@ -269,6 +274,10 @@ public partial class PlayerPoseController : MonoBehaviour
|
||||
}
|
||||
|
||||
_toPlayable = AnimationClipPlayable.Create(_graph, clip);
|
||||
// Off by default: foot IK plants the foot on its goal and bends the knee to reach it, so a straight-knee
|
||||
// pose renders bent (SampleAnimation, which the authoring tools check against, never applies it). The
|
||||
// outgoing pose on input 0 is a former _toPlayable, so it already carries this setting.
|
||||
_toPlayable.SetApplyFootIK(applyFootIK);
|
||||
_mixer.ConnectInput(1, _toPlayable, 0);
|
||||
_toClip = clip;
|
||||
|
||||
|
||||
Reference in new issue
Block a user