This commit is contained in:
2022-09-10 15:38:17 +03:00
parent 1e05c48ca6
commit e879f36b29
6 changed files with 194 additions and 187 deletions

1
.gitignore vendored
View File

@@ -70,3 +70,4 @@ crashlytics-build.properties
# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*
*.zip

File diff suppressed because one or more lines are too long

View File

@@ -27,7 +27,7 @@ MonoBehaviour:
m_SupportsHDR: 1
m_MSAA: 1
m_RenderScale: 0.4
m_UpscalingFilter: 0
m_UpscalingFilter: 2
m_FsrOverrideSharpness: 0
m_FsrSharpness: 0.92
m_MainLightRenderingMode: 1

View File

@@ -27,7 +27,7 @@ MonoBehaviour:
m_SupportsHDR: 0
m_MSAA: 1
m_RenderScale: 0.4
m_UpscalingFilter: 0
m_UpscalingFilter: 2
m_FsrOverrideSharpness: 0
m_FsrSharpness: 0.92
m_MainLightRenderingMode: 1

View File

@@ -15,6 +15,9 @@ public class CameraBob : MonoBehaviour
CharacterController controller;
public bool IsRotating = false;
//public int XRotStop = 1000;
//public int YRotStop = 1000;
Vector3 StartPos;
Quaternion StartRot;
@@ -57,25 +60,26 @@ public class CameraBob : MonoBehaviour
if (!IsRotating)
PlayMotion(FootStepMotion());
else
PlayMotion(FootStepRotation());
return;
//PlayMotion(FootStepRotation());
}
Vector3 FootStepMotion()
{
Vector3 pos = Vector3.zero;
pos.y += Mathf.Sin(Time.time * Frequency) * Amplitude;
pos.x += Mathf.Cos(Time.time * Frequency / 2) * Amplitude *2;
pos.y += Mathf.Cos(Time.time * Frequency) * Amplitude;
pos.x += Mathf.Sin(Time.time * Frequency / 2) * Amplitude *2;
return pos;
}
/*
Quaternion FootStepRotation()
{
Quaternion pos = new Quaternion(0,0,0,0);
pos.y += Mathf.Sin(Time.time * Frequency) * Amplitude;
pos.x += Mathf.Cos(Time.time * Frequency / 2) * Amplitude * 2;
pos.y += Mathf.Sin(Time.time * Frequency) * (Amplitude / YRotStop);
pos.x += Mathf.Cos(Time.time * Frequency / 2) * (Amplitude / XRotStop);
return pos;
}
*/
void ResetPosition()
{
if (!IsRotating)
@@ -86,6 +90,7 @@ public class CameraBob : MonoBehaviour
else
{
if (Camera.localRotation == StartRot) return;
Camera.localRotation = Quaternion.Lerp(Camera.localRotation, StartRot, Time.deltaTime);
}
}

View File

@@ -50,16 +50,16 @@ public class CameraMovement : MonoBehaviour
}
}
IEnumerator PauseGame()
IEnumerable PauseGame()
{
SceneManager.LoadSceneAsync("pause", LoadSceneMode.Additive);
Time.timeScale = 0;
return null;
}
IEnumerator UnPauseGame()
IEnumerable UnPauseGame()
{
SceneManager.UnloadSceneAsync("pause" );
SceneManager.UnloadSceneAsync("pause");
Time.timeScale = 1;
return null;
}