- Home /
Camera Scripts
Bit of an issue I'm having here, I'm new so do forgive me if this has been answered before.
I have an ingame cutscene at the end of a level, which starts off with the camera moving into the centre of the scene which is activated with a trigger that the player collides with. However I have added a script to the camera to follow the ball that the player is controlling. The trigger works fine, initially moving the camera to the right position, but after the animation of the camera moving is up (about 2 seconds) it switches back to the player.
Would this have to be something I edit in the cameras tracking code or in the triggers?
Any help would be great.
Answer by Yokimato · Apr 24, 2013 at 07:28 PM
I Would simply disable your Camera script when from the Trigger function. You didn't post any code but it'd be something like this:
void OnTrigger() {
MyCameraFollowScript followScript = Camera.GetComponent<MyCameraFollowScript>();
followScript.SetActive(false);
}
Your answer
![](https://koobas.hobune.stream/wayback/20220613100938im_/https://answers.unity.com/themes/thub/images/avi.jpg)