Skip to content
This repository has been archived by the owner on Jul 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #34 from fgsoftware1/master
Browse files Browse the repository at this point in the history
third person look around fix
  • Loading branch information
fgsoftware1 authored Aug 27, 2021
2 parents 55fe979 + 16f2cbe commit 85258fb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 33 deletions.
18 changes: 0 additions & 18 deletions Assets/Scenes/Game.unity
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,6 @@ GameObject:
- component: {fileID: 1047239738}
- component: {fileID: 1047239740}
- component: {fileID: 1047239739}
- component: {fileID: 1047239741}
- component: {fileID: 1047239742}
m_Layer: 0
m_Name: Capsule
Expand Down Expand Up @@ -626,22 +625,6 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1047239737}
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
--- !u!54 &1047239741
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1047239737}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &1047239742
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -861,7 +844,6 @@ MonoBehaviour:
runningSpeed: 11.5
jumpSpeed: 8
gravity: 20
playerCamera: {fileID: 643334563}
lookSpeed: 5
lookXLimit: 45
canMove: 1
Expand Down
10 changes: 9 additions & 1 deletion Assets/Scripts/Manager/CameraManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@ public class CameraManager : MonoBehaviour
public Camera fpCamera;
public Camera tpCamera;

private void Start()
public void Start()
{
fpCamera.enabled = true;
Player.playerCamera = fpCamera;
tpCamera.enabled = false;
}

private void Update()
{
if (fpCamera.enabled)
{
Player.playerCamera = fpCamera;
}else
{
Player.playerCamera = tpCamera;
}
if (Input.GetKeyDown(KeyCode.Tab))
{
if (fpCamera.enabled)
Expand Down
4 changes: 1 addition & 3 deletions Assets/Scripts/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class Player : MonoBehaviour
public float runningSpeed = 11.5f;
public float jumpSpeed = 8.0f;
public float gravity = 20.0f;
public Camera playerCamera;
public static Camera playerCamera;
public float lookSpeed = 2.0f;
public float lookXLimit = 45.0f;

Expand All @@ -22,8 +22,6 @@ public class Player : MonoBehaviour
private void Start()
{
characterController = GetComponent<CharacterController>();

Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}

Expand Down
15 changes: 4 additions & 11 deletions fmod_editor.log
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
[LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135)
[LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135)
[LOG] PlaybackSystem::acquireMasterBus : Setting master channel group format to 6
[LOG] SoundI::release : (000001DD0159E388)
[LOG] SoundI::release : footsteps (000001DD07541288)
[LOG] SoundI::release : (000001DCE9AA8418)
[LOG] SoundI::release : lift (000001DD0753E6A8)
[LOG] SoundI::release : (000001DCB8545D68)
[LOG] SoundI::release : footsteps (000001DD12B013C8)
[LOG] SoundI::release : (000001DCB8545078)
[LOG] SoundI::release : lift (000001DD12B01D88)
[LOG] Thread::callback : FMOD Studio update thread finished.
[LOG] Thread::callback : FMOD Studio bank load thread finished.
[LOG] Profile::disconnectAll : Profiler disconnecting all clients
Expand All @@ -32,10 +32,3 @@
[LOG] Thread::callback : FMOD mixer thread finished.
[LOG] Profile::disconnectAll : Profiler disconnecting all clients
[LOG] SystemI::close : Closed.
[LOG] Thread::callback : FMOD Studio bank load thread finished.
[LOG] Thread::callback : FMOD Studio sample load thread finished.
[LOG] LiveUpdate::release :
[LOG] LiveUpdate::reset : Reset connection (reason Disconnected)
[LOG] Thread::callback : FMOD stream thread finished.
[LOG] Thread::callback : FMOD mixer thread finished.
[LOG] SystemI::close : Closed.

0 comments on commit 85258fb

Please sign in to comment.