Skip to content

Commit 7f272e9

Browse files
committed
Added credits
1 parent d908663 commit 7f272e9

File tree

7 files changed

+34
-28
lines changed

7 files changed

+34
-28
lines changed

Assets/Prefabs/Cinemachine_ RTS.prefab

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ Transform:
7171
m_PrefabAsset: {fileID: 0}
7272
m_GameObject: {fileID: 1550261046715970134}
7373
serializedVersion: 2
74-
m_LocalRotation: {x: 0.7071067, y: -0.000000044703484, z: 0.000000014901161, w: 0.7071068}
74+
m_LocalRotation: {x: 0.7069834, y: 0, z: 0, w: 0.7072302}
7575
m_LocalPosition: {x: 2.4988642, y: 20.546234, z: 0.6565523}
7676
m_LocalScale: {x: 1, y: 1, z: 1}
7777
m_ConstrainProportionsScale: 0
7878
m_Children:
7979
- {fileID: 6755515988967416304}
8080
m_Father: {fileID: 0}
81-
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
81+
m_LocalEulerAnglesHint: {x: 89.98, y: 0, z: 0}
8282
--- !u!114 &5034451965605781068
8383
MonoBehaviour:
8484
m_ObjectHideFlags: 0
@@ -100,7 +100,7 @@ MonoBehaviour:
100100
m_LookAt: {fileID: 0}
101101
m_Follow: {fileID: 0}
102102
m_Lens:
103-
FieldOfView: 55.77383
103+
FieldOfView: 95.80372
104104
OrthographicSize: 10
105105
NearClipPlane: 0.1
106106
FarClipPlane: 5000
@@ -146,7 +146,9 @@ MonoBehaviour:
146146
m_Script: {fileID: 11500000, guid: 396ec63b9903f3649b46bf4ae88091ee, type: 3}
147147
m_Name:
148148
m_EditorClassIdentifier:
149-
_panSpeed: 5
150-
_zoomSpeed: 10
149+
_playerTransform: {fileID: 0}
150+
_panSpeed: 10
151+
_zoomSpeed: 20
151152
_zoomInMax: 40
152-
_zoomOutMax: 90
153+
_zoomOutMax: 100
154+
_transitionSmoothness: 3

Assets/Prefabs/Cinemachine_ TPS.prefab

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ MonoBehaviour:
5959
m_Name:
6060
m_EditorClassIdentifier:
6161
m_BindingMode: 4
62-
m_FollowOffset: {x: 0, y: 1.5, z: -10}
62+
m_FollowOffset: {x: 0, y: 3, z: -5}
6363
m_XDamping: 1
6464
m_YDamping: 1
6565
m_ZDamping: 1
@@ -152,7 +152,7 @@ Transform:
152152
m_PrefabAsset: {fileID: 0}
153153
m_GameObject: {fileID: 1743568169910953381}
154154
serializedVersion: 2
155-
m_LocalRotation: {x: 0.016963696, y: -0.0000000032255392, z: 5.4724936e-11, w: 0.9998561}
155+
m_LocalRotation: {x: 0.21112844, y: 0.00000001667586, z: -0.0000000036019419, w: 0.97745836}
156156
m_LocalPosition: {x: 0, y: 0, z: 0}
157157
m_LocalScale: {x: 1, y: 1, z: 1}
158158
m_ConstrainProportionsScale: 0
@@ -265,10 +265,10 @@ MonoBehaviour:
265265
m_Name:
266266
m_EditorClassIdentifier:
267267
m_BindingMode: 4
268-
m_FollowOffset: {x: 0, y: 1.5, z: -10}
269-
m_XDamping: 1
270-
m_YDamping: 1
271-
m_ZDamping: 1
268+
m_FollowOffset: {x: 0, y: 3, z: -5}
269+
m_XDamping: 2
270+
m_YDamping: 2
271+
m_ZDamping: 2
272272
m_AngularDampingMode: 0
273273
m_PitchDamping: 0
274274
m_YawDamping: 0
@@ -393,10 +393,10 @@ MonoBehaviour:
393393
m_Name:
394394
m_EditorClassIdentifier:
395395
m_BindingMode: 4
396-
m_FollowOffset: {x: 0, y: 1.5, z: -10}
397-
m_XDamping: 1
398-
m_YDamping: 1
399-
m_ZDamping: 1
396+
m_FollowOffset: {x: 0, y: 3, z: -5}
397+
m_XDamping: 2
398+
m_YDamping: 2
399+
m_ZDamping: 2
400400
m_AngularDampingMode: 0
401401
m_PitchDamping: 0
402402
m_YawDamping: 0
@@ -503,7 +503,7 @@ Transform:
503503
m_PrefabAsset: {fileID: 0}
504504
m_GameObject: {fileID: 5972725052267486286}
505505
serializedVersion: 2
506-
m_LocalRotation: {x: 0.045593653, y: -0.0000000037214165, z: 1.698496e-10, w: 0.9989601}
506+
m_LocalRotation: {x: 0.23903725, y: 0.000000008128373, z: -0.0000000020009916, w: 0.9710104}
507507
m_LocalPosition: {x: 0, y: 0, z: 0}
508508
m_LocalScale: {x: 1, y: 1, z: 1}
509509
m_ConstrainProportionsScale: 0
@@ -634,7 +634,7 @@ MonoBehaviour:
634634
m_Calls: []
635635
m_LegacyBlendHint: 0
636636
m_YAxis:
637-
Value: 0.5
637+
Value: 1
638638
m_SpeedMode: 0
639639
m_MaxSpeed: 1
640640
m_AccelTime: 0.2
@@ -689,11 +689,11 @@ MonoBehaviour:
689689
m_SplineCurvature: 0.2
690690
m_Orbits:
691691
- m_Height: 3
692-
m_Radius: 8
692+
m_Radius: 5
693693
- m_Height: 1.5
694-
m_Radius: 10
695-
- m_Height: 0
696694
m_Radius: 8
695+
- m_Height: 0
696+
m_Radius: 5
697697
m_LegacyHeadingBias: 3.4028235e+38
698698
m_Rigs:
699699
- {fileID: 572521536822210226}
@@ -770,7 +770,7 @@ Transform:
770770
m_PrefabAsset: {fileID: 0}
771771
m_GameObject: {fileID: 7635277655381779195}
772772
serializedVersion: 2
773-
m_LocalRotation: {x: 0.074376225, y: -0.0000000042090122, z: 3.1391986e-10, w: 0.9972303}
773+
m_LocalRotation: {x: 0.2669336, y: 3.4238033e-15, z: -1.836517e-15, w: 0.96371496}
774774
m_LocalPosition: {x: 0, y: 0, z: 0}
775775
m_LocalScale: {x: 1, y: 1, z: 1}
776776
m_ConstrainProportionsScale: 0

Assets/Prefabs/Input Handler.prefab

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ MonoBehaviour:
4848
type: 3}
4949
jumpAction: {fileID: -2922260707816430123, guid: c986a997d946cf04b8ebf956a2a2e898,
5050
type: 3}
51+
sprintAction: {fileID: 8753171454276481207, guid: c986a997d946cf04b8ebf956a2a2e898,
52+
type: 3}
5153
panAction: {fileID: 9156508360898348377, guid: c986a997d946cf04b8ebf956a2a2e898,
5254
type: 3}
5355
zoomAction: {fileID: 6861643802844128501, guid: c986a997d946cf04b8ebf956a2a2e898,

Assets/Prefabs/Player.prefab

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,9 @@ MonoBehaviour:
150150
_groundedPlayer: 0
151151
_playerSpeed: 5
152152
_jumpHeight: 1
153+
_sprintMultiplier: 2
153154
_gravityValue: -9.81
154-
_rotationSpeed: 4
155+
_rotationSpeed: 5
155156
--- !u!1 &7431381490370900719
156157
GameObject:
157158
m_ObjectHideFlags: 0
@@ -177,7 +178,7 @@ Transform:
177178
m_GameObject: {fileID: 7431381490370900719}
178179
serializedVersion: 2
179180
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
180-
m_LocalPosition: {x: 0, y: 0.51, z: 0.58}
181+
m_LocalPosition: {x: 0, y: 0.554, z: 0.473}
181182
m_LocalScale: {x: 1, y: 1, z: 1}
182183
m_ConstrainProportionsScale: 0
183184
m_Children: []

Assets/Script/InputHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ private void OnDisable()
5454

5555
public Vector2 GetMovementInput()
5656
{
57-
return movementAction.action.ReadValue<Vector2>(); // Reads WASD or joystick input
57+
return movementAction.action.ReadValue<Vector2>();
5858
}
5959

6060
public bool IsJumping()
6161
{
62-
return jumpAction.action.triggered; // Checks if the jump button was pressed
62+
return jumpAction.action.triggered;
6363
}
6464

6565
public bool IsSprinting()
@@ -69,7 +69,7 @@ public bool IsSprinting()
6969

7070
public bool IsSwitchingCamera()
7171
{
72-
return switchCameraAction.action.triggered; // Checks if camera switch was triggered
72+
return switchCameraAction.action.triggered;
7373
}
7474

7575
public Vector2 GetPanInput()

Assets/Script/PlayerController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ void Update()
6464
transform.rotation = Quaternion.Lerp(transform.rotation, targetRotation, Time.deltaTime * _rotationSpeed);
6565
} else // In RTS, the player doesn't have to rotate based on where the camera is looking at.
6666
{
67+
// Cinemachine Third Person Controller w/ Input System - Unity Tutorial, by samyam: https://youtu.be/ImuCx_XVaEQ?t=1044
6768
if (movementInput != Vector2.zero)
6869
{
6970
float targetAngle = Mathf.Atan2(movementInput.x, movementInput.y) * Mathf.Rad2Deg;

Assets/Script/RTSController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ private void Update()
3939
_playerTransform.position.z), Time.deltaTime * _transitionSmoothness);
4040
}
4141

42-
42+
// From here on by samyam: https://youtu.be/PsAbHoB85hM
4343
float x = InputHandler.Instance.GetPanInput().x;
4444
float y = InputHandler.Instance.GetPanInput().y;
4545
float z = InputHandler.Instance.GetZoomInput();

0 commit comments

Comments
 (0)