aboutsummaryrefslogtreecommitdiff
path: root/JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts/MainCameraFollow.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-01-29 22:31:47 +0800
committerchai <chaifix@163.com>2022-01-29 22:31:47 +0800
commit701113cf63da4115f932b6cfb89cd52828ffa405 (patch)
tree5335e513df28c5a1304dab5c3e18e37b82298f62 /JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts/MainCameraFollow.cs
parentd50e3b184c381edecec228893af634eb0f970ebb (diff)
*misc
Diffstat (limited to 'JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts/MainCameraFollow.cs')
-rw-r--r--JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts/MainCameraFollow.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts/MainCameraFollow.cs b/JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts/MainCameraFollow.cs
new file mode 100644
index 0000000..87d1fe5
--- /dev/null
+++ b/JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts/MainCameraFollow.cs
@@ -0,0 +1,20 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace JamTools
+{
+
+ [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