修改人物溜破bug
This commit is contained in:
parent
e2ff053559
commit
44c8b1b9f1
|
@ -209,7 +209,7 @@ public class FirstPersonController : MonoBehaviour
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
float scrollValue=Input.GetAxis("Mouse ScrollWheel");
|
float scrollValue = Input.GetAxis("Mouse ScrollWheel");
|
||||||
playerCamera.fieldOfView = Mathf.Clamp(playerCamera.fieldOfView - scrollValue * 20, 10, 60);
|
playerCamera.fieldOfView = Mathf.Clamp(playerCamera.fieldOfView - scrollValue * 20, 10, 60);
|
||||||
|
|
||||||
#region Camera
|
#region Camera
|
||||||
|
@ -389,12 +389,8 @@ public class FirstPersonController : MonoBehaviour
|
||||||
if (playerCanMove)
|
if (playerCanMove)
|
||||||
{
|
{
|
||||||
// Calculate how fast we should be moving
|
// Calculate how fast we should be moving
|
||||||
//if (stopForce)
|
if (Input.GetAxis("Horizontal") == 0 && Input.GetAxis("Vertical") == 0) return;
|
||||||
//{
|
|
||||||
// if (Input.GetAxis("Horizontal") == 0 && Input.GetAxis("Vertical") == 0)
|
|
||||||
// stopForce = false;
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
Vector3 targetVelocity = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
|
Vector3 targetVelocity = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
|
||||||
|
|
||||||
// Checks if player is walking and isGrounded
|
// Checks if player is walking and isGrounded
|
||||||
|
|
|
@ -1480,6 +1480,42 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3}
|
||||||
|
--- !u!1 &159466234 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 2588606950836171102, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 159466233}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &159466235 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: -7138000903914520420, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 159466233}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!65 &159466236
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 159466234}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 500, y: 761.86084, z: 0}
|
||||||
|
m_Center: {x: 0, y: 119.0697, z: 0}
|
||||||
|
--- !u!65 &159466237
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 159466235}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 500.00397, y: 519.947, z: 0.00008470567}
|
||||||
|
m_Center: {x: -0.0019607544, y: 240.02661, z: 0.08268043}
|
||||||
--- !u!1 &192342789
|
--- !u!1 &192342789
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
Loading…
Reference in New Issue