mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 14:59:23 +00:00
[DesktopVRSwitch] Reworked SteamVR Initialization
New SteamVR initialization to avoid warnings/errors on switch.
This commit is contained in:
parent
61a45f97bc
commit
5f95755ad2
8 changed files with 39 additions and 306 deletions
|
@ -1,4 +1,4 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core;
|
||||
using ABI_RC.Core.UI;
|
||||
using UnityEngine;
|
||||
|
||||
|
@ -26,9 +26,9 @@ public class CohtmlHudTracker : VRModeTracker
|
|||
}
|
||||
DesktopVRSwitch.Logger.Msg("Configuring new hud affinity for CohtmlHud.");
|
||||
|
||||
_cohtmlHud.gameObject.transform.parent = intoVR ? PlayerSetup.Instance.vrCamera.transform : PlayerSetup.Instance.desktopCamera.transform;
|
||||
_cohtmlHud.gameObject.transform.parent = Utils.GetPlayerCameraObject(intoVR).transform;
|
||||
// This handles rotation and position
|
||||
ABI_RC.Core.CVRTools.ConfigureHudAffinity();
|
||||
CVRTools.ConfigureHudAffinity();
|
||||
_cohtmlHud.gameObject.transform.localScale = new Vector3(1.2f, 1f, 1.2f);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue