Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class CameraFollow : MonoBehaviour
- {
- public Transform target;
- public float smoothSpeed = 10f;
- void LateUpdate()
- {
- transform.position = Vector3.Lerp(
- transform.position,
- target.position,
- smoothSpeed * Time.deltaTime
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment