Advertisement
rodrigofbm

Camera

Aug 13th, 2015
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class CameraFollow : MonoBehaviour {
  5.     public Transform Seguir;
  6.     public float VelocidadeCamera;
  7.  
  8.     void LateUpdate () {
  9.        
  10.         if(Seguir){
  11.            
  12.             transform.position = Vector3.Lerp(Seguir.transform.position, Seguir.position, VelocidadeCamera * Time.deltaTime) + new Vector3(0.8f,0.4f,0);
  13.            
  14.         }
  15.        
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement