aboutsummaryrefslogtreecommitdiff
path: root/JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/MainCameraFollow.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-02-20 17:29:32 +0800
committerchai <chaifix@163.com>2022-02-20 17:29:32 +0800
commit0e8ce5318fe683d0cf3d2c7c98fb361f62d4428f (patch)
tree8229d98905fa50a4c9d115a94ffb7a3a67667371 /JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/MainCameraFollow.cs
parentbdd4f322fd39485820cdf5c1fbdc6b712e81084b (diff)
* rename folder
Diffstat (limited to 'JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/MainCameraFollow.cs')
-rw-r--r--JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/MainCameraFollow.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/MainCameraFollow.cs b/JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/MainCameraFollow.cs
new file mode 100644
index 0000000..e310715
--- /dev/null
+++ b/JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/MainCameraFollow.cs
@@ -0,0 +1,20 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace JamUtils
+{
+
+ [RequireComponent(typeof(Camera))]
+ public class MainCameraFollow : MonoBehaviour
+ {
+
+ public void SetCameraPositionAndRotation(Transform reference)
+ {
+ transform.position = reference.position;
+ transform.rotation = reference.rotation;
+ }
+
+ }
+
+} \ No newline at end of file