qol stuff

two small fixes so thirdperson feels better to use

no longer scrolls while in menus or unity explorer, and frontview
This commit is contained in:
NotAKidoS 2023-04-25 18:04:14 -05:00
parent 31d199ec5a
commit 08d305f3a5
2 changed files with 3 additions and 2 deletions

View file

@ -153,7 +153,7 @@ internal static class CameraLogic
switch (location) switch (location)
{ {
case CameraLocation.FrontView: case CameraLocation.FrontView:
_ourCam.transform.localPosition = new Vector3(0, 0.015f, 0.55f + _dist); _ourCam.transform.localPosition = new Vector3(0, 0.015f, 0.55f - _dist);
_ourCam.transform.localRotation = new Quaternion(0, 180, 0, 0); _ourCam.transform.localRotation = new Quaternion(0, 180, 0, 0);
CurrentLocation = CameraLocation.FrontView; CurrentLocation = CameraLocation.FrontView;
break; break;

View file

@ -34,7 +34,8 @@ public class ThirdPerson : MelonMod
public override void OnUpdate() public override void OnUpdate()
{ {
if (State) // Prevents scrolling while in Menus or UnityExplorer
if (State && Cursor.lockState == CursorLockMode.Locked)
{ {
if (Input.GetAxis("Mouse ScrollWheel") > 0f) IncrementDist(); if (Input.GetAxis("Mouse ScrollWheel") > 0f) IncrementDist();
else if (Input.GetAxis("Mouse ScrollWheel") < 0f) DecrementDist(); else if (Input.GetAxis("Mouse ScrollWheel") < 0f) DecrementDist();