So I am just starting with unity, I have made a player who is a sphere with a texture and a light source coming from it (don’t ask why) I followed a brackeys tutorial to help me get a camera to follow the player, whenever i hit play after setting a value, the sphere shoots off into the distance almost instantly, what do i do to make it follow the player instead of flying off at light speed?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraController : MonoBehaviour {
public Transform target;
public float smoothSpeed = 0.125f;
public Vector3 offset;
void LateUpdate()
{
transform.position = target.position + offset;
}
}