mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 14:59:23 +00:00
[DesktopVRSwitch] Stop being a baby.
???
This commit is contained in:
parent
133f5200b4
commit
6774c3ff6d
22 changed files with 205 additions and 169 deletions
|
@ -18,17 +18,11 @@ public class CohtmlHudTracker : VRModeTracker
|
|||
|
||||
private void OnPostSwitch(bool intoVR)
|
||||
{
|
||||
CohtmlHud _cohtmlHud = CohtmlHud.Instance;
|
||||
if (_cohtmlHud == null)
|
||||
{
|
||||
DesktopVRSwitch.Logger.Error("Error while getting CohtmlHud!");
|
||||
return;
|
||||
}
|
||||
DesktopVRSwitch.Logger.Msg("Configuring new hud affinity for CohtmlHud.");
|
||||
|
||||
_cohtmlHud.gameObject.transform.parent = Utils.GetPlayerCameraObject(intoVR).transform;
|
||||
CohtmlHud.Instance.gameObject.transform.parent = Utils.GetPlayerCameraObject(intoVR).transform;
|
||||
// This handles rotation and position
|
||||
CVRTools.ConfigureHudAffinity();
|
||||
_cohtmlHud.gameObject.transform.localScale = new Vector3(1.2f, 1f, 1.2f);
|
||||
CohtmlHud.Instance.gameObject.transform.localScale = new Vector3(1.2f, 1f, 1.2f);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue