From 63795c45af9ecca5aea36fbe291b18fcd9fb9b7d Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 18 Feb 2022 14:38:20 +0800 Subject: *rename folder name --- .../Scripts/MainCameraFollow.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 JamHelper/Assets/JamUtils/FPSControllerVelocity/Scripts/MainCameraFollow.cs (limited to 'JamHelper/Assets/JamUtils/FPSControllerVelocity/Scripts/MainCameraFollow.cs') diff --git a/JamHelper/Assets/JamUtils/FPSControllerVelocity/Scripts/MainCameraFollow.cs b/JamHelper/Assets/JamUtils/FPSControllerVelocity/Scripts/MainCameraFollow.cs new file mode 100644 index 0000000..87d1fe5 --- /dev/null +++ b/JamHelper/Assets/JamUtils/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 -- cgit v1.1-26-g67d0