Smooth 2D Camera Follow In Unity3D

This is just a nice short and simple script that I sometimes use to make the camera in Unity smoothly follow an object. Just add this script to a orthographic camera and select a target and follow speed in the inspector.

The Code

using UnityEngine;

public class CameraFollow2D : MonoBehaviour
{
    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);
    }
}

Integrating Steamworks And Achievements Into Unity3D

Step by step guide on how to integrate Steamworks into a Unity3D project Continue reading

Microsoft Visual Studio in Linux with Unity3D

Published on March 26, 2017

Circle Loading Animation In Unity3D

Published on January 08, 2017