mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-04 19:09:23 +00:00
Handling of "VR <-> Desktop" switch, attempt one
This commit is contained in:
parent
c2a219dfa3
commit
66b448a2c3
20 changed files with 356 additions and 77 deletions
|
@ -427,6 +427,32 @@ namespace ml_prm
|
|||
OnAngularDragChange(Settings.AngularDrag);
|
||||
}
|
||||
|
||||
internal void OnPreAvatarReinitialize()
|
||||
{
|
||||
if(m_avatarReady && m_enabled)
|
||||
{
|
||||
m_forcedSwitch = true;
|
||||
SwitchRagdoll();
|
||||
m_forcedSwitch = false;
|
||||
}
|
||||
}
|
||||
internal void OnPostAvatarReinitialize()
|
||||
{
|
||||
m_inVR = Utils.IsInVR();
|
||||
m_vrIK = PlayerSetup.Instance._avatar.GetComponent<VRIK>();
|
||||
|
||||
if(m_vrIK != null)
|
||||
m_vrIK.onPostSolverUpdate.AddListener(this.OnIKPostUpdate);
|
||||
|
||||
if(m_avatarReady && m_enabled)
|
||||
{
|
||||
m_forcedSwitch = true;
|
||||
SwitchRagdoll();
|
||||
m_forcedSwitch = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal void OnAvatarScaling(float p_scaleDifference)
|
||||
{
|
||||
if(m_puppetRoot != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue