mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 01:00:16 +00:00
fix IK
This commit is contained in:
parent
77949ebce1
commit
c6db6044c9
@ -32,7 +32,7 @@ namespace QSB.ConversationSync.Events
|
||||
{
|
||||
case ConversationType.Character:
|
||||
var translated = TextTranslation.Translate(message.Message).Trim();
|
||||
translated = Regex.Replace(translated, @"<Pause=?\d*\.?\d*\/>", "");
|
||||
translated = Regex.Replace(translated, @"<Pause=?\d*\.?\d*\s\/>", "");
|
||||
ConversationManager.Instance.DisplayCharacterConversationBox(message.ObjectId, translated);
|
||||
break;
|
||||
|
||||
|
@ -97,12 +97,13 @@ namespace QSB.ConversationSync.Patches
|
||||
var position = playerId == uint.MaxValue
|
||||
? Locator.GetActiveCamera().transform.position
|
||||
: QSBPlayerManager.GetPlayer(playerId).CameraBody.transform.position;
|
||||
var b = ___headTrackingWeight * Mathf.Min(1, !___lookOnlyWhenTalking
|
||||
var localPosition = ____animator.transform.InverseTransformPoint(position);
|
||||
var targetWeight = ___headTrackingWeight * Mathf.Min(1, !___lookOnlyWhenTalking
|
||||
? !____playerInHeadZone ? 0 : 1
|
||||
: !____inConversation || !____playerInHeadZone ? 0 : 1);
|
||||
____currentLookWeight = Mathf.Lerp(____currentLookWeight, b, Time.deltaTime * 2f);
|
||||
____currentLookTarget = ___lookSpring.Update(____currentLookTarget, position, Time.deltaTime);
|
||||
____animator.SetLookAtPosition(____currentLookTarget);
|
||||
____currentLookWeight = Mathf.Lerp(____currentLookWeight, targetWeight, Time.deltaTime * 2f);
|
||||
____currentLookTarget = ___lookSpring.Update(____currentLookTarget, localPosition, Time.deltaTime);
|
||||
____animator.SetLookAtPosition(____animator.transform.TransformPoint(____currentLookTarget));
|
||||
____animator.SetLookAtWeight(____currentLookWeight);
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user