Signed-off-by: magn9775 <magnusd2005@gmail.com>

This commit is contained in:
magn9775
2024-04-23 15:40:28 +02:00
parent 1d032920da
commit 784bfaff4d
8 changed files with 62 additions and 147 deletions

View File

@@ -10,7 +10,9 @@ public class CarLoader : MonoBehaviour
string carType;
string carColor;
public Material[] Colors;
public CinemachineVirtualCamera vcam;
public GameObject cam;
public GameObject targetcar;
void Start()
{
carType = GameObject.Find("Car Data").GetComponent<CarData>().carType;
@@ -30,8 +32,8 @@ public class CarLoader : MonoBehaviour
car.GetComponent<carcontrolv2>().enabled = true;
car.GetComponent<AgentControllerV6>().enabled = false;
vcam.Follow = car.transform;
vcam.LookAt = car.transform;
cam.GetComponent<CameraControl>().getCar(car);
//LookAt = car.transform;
if (color == "Default")
{