Hi, I have this existing code for the other things I need to happen:
void OnMouseDown() {
GameObject.Find("Player_ShotgunDude").GetComponent<PlayerMovement>().enabled=true;
GameObject.Find("Main Camera").transform.position = new Vector3(0, 20, 0);
GameObject.Find("Main Camera").GetComponent<CameraFollow>().enabled=true;
}
I want to add another piece to my OnMouseDown that finds the main camera and its CameraFollow script and changes the target of that script to whatever other gameobject I specified at the time.
I tried looking to see if there was any set target stuff but didnt find anything. Any help would be appreciated.
Cheers.