Fix unstable humanoid pose when using pose and simpleSpineIK
This commit is contained in:
parent
411b97e33d
commit
43edc40b53
@ -855,6 +855,7 @@ namespace Passer {
|
|||||||
else {
|
else {
|
||||||
humanoid.pose.Show(humanoid);
|
humanoid.pose.Show(humanoid);
|
||||||
humanoid.CopyRigToTargets();
|
humanoid.CopyRigToTargets();
|
||||||
|
humanoid.MatchTargetsToAvatar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -551,12 +551,13 @@ namespace Passer {
|
|||||||
humanoid.pose.UpdatePose(humanoid);
|
humanoid.pose.UpdatePose(humanoid);
|
||||||
else {
|
else {
|
||||||
humanoid.pose.Show(humanoid);
|
humanoid.pose.Show(humanoid);
|
||||||
footTarget.CopyRigToTarget();
|
humanoid.CopyRigToTargets();
|
||||||
|
humanoid.MatchTargetsToAvatar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the target rig from the current foot target
|
// update the target rig from the current foot target
|
||||||
footTarget.CopyTargetToRig();
|
humanoid.CopyTargetsToRig();
|
||||||
// update the avatar bones from the target rig
|
// update the avatar bones from the target rig
|
||||||
humanoid.UpdateMovements();
|
humanoid.UpdateMovements();
|
||||||
// match the target rig with the new avatar pose
|
// match the target rig with the new avatar pose
|
||||||
|
@ -695,12 +695,13 @@ namespace Passer.Humanoid {
|
|||||||
humanoid.pose.UpdatePose(humanoid);
|
humanoid.pose.UpdatePose(humanoid);
|
||||||
else {
|
else {
|
||||||
humanoid.pose.Show(humanoid);
|
humanoid.pose.Show(humanoid);
|
||||||
handTarget.CopyRigToTarget();
|
humanoid.CopyRigToTargets();
|
||||||
|
humanoid.MatchTargetsToAvatar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the target rig from the current hand target
|
// update the target rig from the current hand target
|
||||||
handTarget.CopyTargetToRig();
|
humanoid.CopyTargetsToRig();
|
||||||
// update the avatar bones from the target rig
|
// update the avatar bones from the target rig
|
||||||
humanoid.UpdateMovements();
|
humanoid.UpdateMovements();
|
||||||
// match the target rig with the new avatar pose
|
// match the target rig with the new avatar pose
|
||||||
|
@ -482,12 +482,13 @@ namespace Passer.Humanoid {
|
|||||||
humanoid.pose.UpdatePose(humanoid);
|
humanoid.pose.UpdatePose(humanoid);
|
||||||
else {
|
else {
|
||||||
humanoid.pose.Show(humanoid);
|
humanoid.pose.Show(humanoid);
|
||||||
headTarget.CopyRigToTarget();
|
humanoid.CopyRigToTargets();
|
||||||
|
humanoid.MatchTargetsToAvatar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the target rig from the current head target
|
// update the target rig from the current head target
|
||||||
headTarget.CopyTargetToRig();
|
humanoid.CopyTargetToRig();
|
||||||
// update the avatar bones from the target rig
|
// update the avatar bones from the target rig
|
||||||
humanoid.UpdateMovements();
|
humanoid.UpdateMovements();
|
||||||
// match the target rig with the new avatar pose
|
// match the target rig with the new avatar pose
|
||||||
|
@ -276,12 +276,13 @@ namespace Passer {
|
|||||||
humanoid.pose.UpdatePose(humanoid);
|
humanoid.pose.UpdatePose(humanoid);
|
||||||
else {
|
else {
|
||||||
humanoid.pose.Show(humanoid);
|
humanoid.pose.Show(humanoid);
|
||||||
hipsTarget.CopyRigToTarget();
|
humanoid.CopyRigToTargets();
|
||||||
|
humanoid.MatchTargetsToAvatar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the target rig from the current hips target
|
// update the target rig from the current hips target
|
||||||
hipsTarget.CopyTargetToRig();
|
humanoid.CopyTargetsToRig();
|
||||||
// update the avatar bones to match the target rig
|
// update the avatar bones to match the target rig
|
||||||
humanoid.UpdateMovements();
|
humanoid.UpdateMovements();
|
||||||
// match the target rig with the new avatar pose
|
// match the target rig with the new avatar pose
|
||||||
|
@ -751,7 +751,7 @@ namespace Passer.Humanoid {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Copies the pose of the target rig to the avatar</summary>
|
/// <summary>Copies the pose of the target rig to the avatar</summary>
|
||||||
private void CopyTargetsToRig() {
|
public void CopyTargetsToRig() {
|
||||||
hipsTarget.CopyTargetToRig();
|
hipsTarget.CopyTargetToRig();
|
||||||
headTarget.CopyTargetToRig();
|
headTarget.CopyTargetToRig();
|
||||||
leftHandTarget.CopyTargetToRig();
|
leftHandTarget.CopyTargetToRig();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user