Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class CameraController : MonoBehaviour
  6. {
  7. public GameObject cameraDock = null;
  8. public float speed = 0;
  9.  
  10. // Start is called before the first frame update
  11. void Start()
  12. {
  13.  
  14. }
  15.  
  16. // Update is called once per frame
  17. void Update()
  18. {
  19. transform.position = Vector3.Lerp(transform.position, cameraDock.transform.position, Time.deltaTime * speed);
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement