Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
706ad21ed1 | ||
|
|
6c112d7784 | ||
|
|
b4f80a4cf1 |
@@ -96,6 +96,7 @@ LightmapSettings:
|
|||||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||||
m_ExportTrainingData: 0
|
m_ExportTrainingData: 0
|
||||||
m_TrainingDataDestination: TrainingData
|
m_TrainingDataDestination: TrainingData
|
||||||
|
m_LightProbeSampleCountMultiplier: 4
|
||||||
m_LightingDataAsset: {fileID: 0}
|
m_LightingDataAsset: {fileID: 0}
|
||||||
m_UseShadowmask: 1
|
m_UseShadowmask: 1
|
||||||
--- !u!196 &4
|
--- !u!196 &4
|
||||||
@@ -199,6 +200,7 @@ MeshRenderer:
|
|||||||
m_MotionVectors: 1
|
m_MotionVectors: 1
|
||||||
m_LightProbeUsage: 1
|
m_LightProbeUsage: 1
|
||||||
m_ReflectionProbeUsage: 1
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
m_RenderingLayerMask: 1
|
m_RenderingLayerMask: 1
|
||||||
m_RendererPriority: 0
|
m_RendererPriority: 0
|
||||||
m_Materials:
|
m_Materials:
|
||||||
@@ -270,8 +272,9 @@ Light:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 705507993}
|
m_GameObject: {fileID: 705507993}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 9
|
serializedVersion: 10
|
||||||
m_Type: 1
|
m_Type: 1
|
||||||
|
m_Shape: 0
|
||||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||||
m_Intensity: 1
|
m_Intensity: 1
|
||||||
m_Range: 10
|
m_Range: 10
|
||||||
@@ -396,6 +399,7 @@ MeshRenderer:
|
|||||||
m_MotionVectors: 1
|
m_MotionVectors: 1
|
||||||
m_LightProbeUsage: 1
|
m_LightProbeUsage: 1
|
||||||
m_ReflectionProbeUsage: 1
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
m_RenderingLayerMask: 1
|
m_RenderingLayerMask: 1
|
||||||
m_RendererPriority: 0
|
m_RendererPriority: 0
|
||||||
m_Materials:
|
m_Materials:
|
||||||
@@ -477,10 +481,10 @@ MeshRenderer:
|
|||||||
m_MotionVectors: 1
|
m_MotionVectors: 1
|
||||||
m_LightProbeUsage: 1
|
m_LightProbeUsage: 1
|
||||||
m_ReflectionProbeUsage: 1
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
m_RenderingLayerMask: 1
|
m_RenderingLayerMask: 1
|
||||||
m_RendererPriority: 0
|
m_RendererPriority: 0
|
||||||
m_Materials:
|
m_Materials: []
|
||||||
- {fileID: 2100000, guid: 727f61c75f8320d4ab79aaf01ab76181, type: 2}
|
|
||||||
m_StaticBatchInfo:
|
m_StaticBatchInfo:
|
||||||
firstSubMesh: 0
|
firstSubMesh: 0
|
||||||
subMeshCount: 0
|
subMeshCount: 0
|
||||||
@@ -542,24 +546,22 @@ MonoBehaviour:
|
|||||||
rotationSpeed: 20
|
rotationSpeed: 20
|
||||||
pivot: {fileID: 1402695046}
|
pivot: {fileID: 1402695046}
|
||||||
playerModel: {fileID: 615882415}
|
playerModel: {fileID: 615882415}
|
||||||
--- !u!143 &741217458
|
--- !u!54 &741217458
|
||||||
CharacterController:
|
Rigidbody:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 741217452}
|
m_GameObject: {fileID: 741217452}
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_IsTrigger: 0
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Height: 2
|
m_Mass: 1
|
||||||
m_Radius: 0.5
|
m_Drag: 5
|
||||||
m_SlopeLimit: 45
|
m_AngularDrag: 0.05
|
||||||
m_StepOffset: 0.3
|
m_UseGravity: 1
|
||||||
m_SkinWidth: 0.08
|
m_IsKinematic: 0
|
||||||
m_MinMoveDistance: 0.001
|
m_Interpolate: 0
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
m_Constraints: 80
|
||||||
|
m_CollisionDetection: 0
|
||||||
--- !u!1 &876326172
|
--- !u!1 &876326172
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -620,6 +622,7 @@ MeshRenderer:
|
|||||||
m_MotionVectors: 1
|
m_MotionVectors: 1
|
||||||
m_LightProbeUsage: 1
|
m_LightProbeUsage: 1
|
||||||
m_ReflectionProbeUsage: 1
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
m_RenderingLayerMask: 1
|
m_RenderingLayerMask: 1
|
||||||
m_RendererPriority: 0
|
m_RendererPriority: 0
|
||||||
m_Materials:
|
m_Materials:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Collections;
|
|||||||
|
|
||||||
public class PlayerController : MonoBehaviour
|
public class PlayerController : MonoBehaviour
|
||||||
{
|
{
|
||||||
CharacterController characterController;
|
Rigidbody rb;
|
||||||
|
|
||||||
public float speed;
|
public float speed;
|
||||||
public float jumpSpeed;
|
public float jumpSpeed;
|
||||||
@@ -19,14 +19,19 @@ public class PlayerController : MonoBehaviour
|
|||||||
public GameObject playerModel;
|
public GameObject playerModel;
|
||||||
|
|
||||||
private bool extraJump = true;
|
private bool extraJump = true;
|
||||||
|
private float distToGround;
|
||||||
private Vector3 moveDirection;
|
private Vector3 moveDirection;
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
characterController = GetComponent<CharacterController>();
|
rb = GetComponent<Rigidbody>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
bool IsGrounded(){
|
||||||
|
return Physics.Raycast(transform.position, -Vector3.up, distToGround + 0.1f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FixedUpdate()
|
||||||
{
|
{
|
||||||
|
|
||||||
float yStore = moveDirection.y;
|
float yStore = moveDirection.y;
|
||||||
@@ -43,7 +48,7 @@ public class PlayerController : MonoBehaviour
|
|||||||
|
|
||||||
moveDirection.y = yStore;
|
moveDirection.y = yStore;
|
||||||
|
|
||||||
if (characterController.isGrounded)
|
if (IsGrounded())
|
||||||
{
|
{
|
||||||
extraJump = true;
|
extraJump = true;
|
||||||
moveDirection.y = 0.0f;
|
moveDirection.y = 0.0f;
|
||||||
@@ -72,7 +77,7 @@ public class PlayerController : MonoBehaviour
|
|||||||
moveDirection.y = moveDirection.y + (Physics.gravity.y * gravity * Time.deltaTime);
|
moveDirection.y = moveDirection.y + (Physics.gravity.y * gravity * Time.deltaTime);
|
||||||
|
|
||||||
// Move the controller
|
// Move the controller
|
||||||
characterController.Move(moveDirection * Time.deltaTime);
|
rb.AddForce(moveDirection * Time.deltaTime);
|
||||||
|
|
||||||
//Move the player in different directions based on camera look direction
|
//Move the player in different directions based on camera look direction
|
||||||
//Need to switch to 'raw' when using keyboard
|
//Need to switch to 'raw' when using keyboard
|
||||||
|
|||||||
@@ -3,11 +3,10 @@
|
|||||||
"com.unity.collab-proxy": "1.2.16",
|
"com.unity.collab-proxy": "1.2.16",
|
||||||
"com.unity.ext.nunit": "1.0.0",
|
"com.unity.ext.nunit": "1.0.0",
|
||||||
"com.unity.ide.rider": "1.1.0",
|
"com.unity.ide.rider": "1.1.0",
|
||||||
"com.unity.ide.vscode": "1.1.2",
|
"com.unity.ide.vscode": "1.1.3",
|
||||||
"com.unity.package-manager-ui": "2.2.0",
|
"com.unity.test-framework": "1.1.3",
|
||||||
"com.unity.test-framework": "1.0.13",
|
|
||||||
"com.unity.textmeshpro": "2.0.1",
|
"com.unity.textmeshpro": "2.0.1",
|
||||||
"com.unity.timeline": "1.1.0",
|
"com.unity.timeline": "1.2.6",
|
||||||
"com.unity.ugui": "1.0.0",
|
"com.unity.ugui": "1.0.0",
|
||||||
"com.unity.modules.ai": "1.0.0",
|
"com.unity.modules.ai": "1.0.0",
|
||||||
"com.unity.modules.androidjni": "1.0.0",
|
"com.unity.modules.androidjni": "1.0.0",
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,2 @@
|
|||||||
m_EditorVersion: 2019.2.13f1
|
m_EditorVersion: 2019.3.0f1
|
||||||
m_EditorVersionWithRevision: 2019.2.13f1 (e20f6c7e5017)
|
m_EditorVersionWithRevision: 2019.3.0f1 (ffacea4b84e7)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user