mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 23:09:22 +00:00
34 lines
902 B
C#
34 lines
902 B
C#
using ABI_RC.Core.EventSystem;
|
|
using ABI_RC.Core.Player;
|
|
using ABI_RC.Core.Savior;
|
|
using ABI_RC.Systems.MovementSystem;
|
|
using UnityEngine;
|
|
|
|
namespace NAK.DesktopVRSwitch;
|
|
|
|
internal static class Utils
|
|
{
|
|
internal static GameObject GetPlayerCameraObject(bool intoVR)
|
|
{
|
|
if (intoVR)
|
|
{
|
|
return PlayerSetup.Instance.vrCamera;
|
|
}
|
|
return PlayerSetup.Instance.desktopCamera;
|
|
}
|
|
|
|
//stole from kafe :>
|
|
internal static Vector3 GetPlayerRootPosition()
|
|
{
|
|
return MovementSystem.Instance.rotationPivot.position with
|
|
{
|
|
y = MovementSystem.Instance.transform.position.y
|
|
};
|
|
}
|
|
|
|
internal static void ReloadLocalAvatar()
|
|
{
|
|
DesktopVRSwitch.Logger.Msg("Attempting to reload current local avatar from GUID.");
|
|
AssetManagement.Instance.LoadLocalAvatar(MetaPort.Instance.currentAvatarGuid);
|
|
}
|
|
}
|