Hi all. I have 1 camera in main menu scene, and this camera can move between tab menu (settings, credits etc.) Camera moved through Vector3.Lerp in update func. After the moving camera, it sticks. I can’t move the camera even in the ‘Scene creator’. I understand, Vector3.Lerp continue to be implemented. How i can stop this script after the camera move to EndPoint?
*** Code forcing move the camera:
`
void OnMouseDown() {
if(option){
if (!started_option) {
started_option = true; // Перемещение камеры в другую точку.
}
}
}
*** And this pushes camera:
void Update() {
if(started_option == true) {
camera1.transform.position = Vector3.Lerp (StartPoint.position, EndPoint.position, Time.deltaTime*10);
}
}
`
Thanks everyone for the tips!! GoodLuck with coding.