mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
Fix emote offset issue.
This commit is contained in:
parent
8a69c2d51e
commit
1921c7b782
2 changed files with 11 additions and 10 deletions
|
@ -208,6 +208,7 @@ internal class DesktopVRIKSystem : MonoBehaviour
|
|||
HandleLocomotionTracking();
|
||||
UpdateLocomotionWeight();
|
||||
ApplyBodySystemWeights();
|
||||
ResetAvatarLocalPosition();
|
||||
}
|
||||
|
||||
void HandleLocomotionTracking()
|
||||
|
@ -306,6 +307,13 @@ internal class DesktopVRIKSystem : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
void ResetAvatarLocalPosition()
|
||||
{
|
||||
// Reset avatar offset
|
||||
avatarTransform.localPosition = Vector3.zero;
|
||||
avatarTransform.localRotation = Quaternion.identity;
|
||||
}
|
||||
|
||||
public void OnSetupAvatarDesktop()
|
||||
{
|
||||
if (!Setting_Enabled) return;
|
||||
|
@ -382,13 +390,6 @@ internal class DesktopVRIKSystem : MonoBehaviour
|
|||
|
||||
public void OnPreSolverUpdate()
|
||||
{
|
||||
// Reset avatar offset
|
||||
avatarTransform.localPosition = Vector3.zero;
|
||||
avatarTransform.localRotation = Quaternion.identity;
|
||||
|
||||
// Don't run during emotes
|
||||
if (_ikEmotePlaying) return;
|
||||
|
||||
// Set plant feet
|
||||
avatarIKSolver.plantFeet = Setting_PlantFeet;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue