From 0e8ce5318fe683d0cf3d2c7c98fb361f62d4428f Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 20 Feb 2022 17:29:32 +0800 Subject: * rename folder --- .../Scripts/MainCameraFollow.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/MainCameraFollow.cs (limited to 'JamHelper/Assets/JamUtils/FirstPersonCharacterController/Scripts/MainCameraFollow.cs') 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 -- cgit v1.1-26-g67d0