Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity smooth camera 2d

    public float FollowSpeed = 2f;
    public Transform Target;

    private void Update()
    {
        Vector3 newPosition = Target.position;
        newPosition.z = -10;
        transform.position = Vector3.Slerp(transform.position, newPosition, FollowSpeed * Time.deltaTime);
    }
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# unity camera follow player horizontal axis 
Csharp :: how to do a web request unity 
Csharp :: ienumerator 
Csharp :: how to move your character in unity 2d game 
Csharp :: c# format string with 2 decimals 
Csharp :: OnCollision update unity 
Csharp :: move to another scene unity 
Csharp :: oncollisionenter unity 
Csharp :: c# change colour of console 
Csharp :: c# generate random int in range 
Csharp :: on collision 2d unity 
Csharp :: change scene unity 
Csharp :: unity find closest point on line 
Csharp :: get current directory cosmos 
Csharp :: how check if variable is send to page or not in laravwel 
Csharp :: if exist TempData[] c# 
Csharp :: c# unity destroy first child object 
Csharp :: how to stop player rotating when hit by object 
Csharp :: constraint unity 2d 
Csharp :: camera follow player 
Csharp :: string format comma c# 
Csharp :: c# dictionary get highest key 
Csharp :: unity animator current state name 
Csharp :: c# how to exit program 
Csharp :: delete all dir content c# 
Csharp :: C# int.parse input string wasnt in correct format 
Csharp :: list of all c# keywords 
Csharp :: unique id c# 
Csharp :: c# check if string is only letters and numbers 
Csharp :: c# odd even median 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =