I am making a rhythm game. It is a turn based rhythm game. I want to make it so when the turn of player1 has ended camera goes and focuses at player2 and when player2's turn ends. gets back to player 1. But i want it to be slow and smooth not instant. Help me?
I didnt try anything i dont know unity so much.
If you want to do it with code, you can use Unity lerp. Lerp takes in three inputs, the first one is the start point, second is the end point and the third input is the interpolation. If you increase the third input to lerp slowly, and assign the output to the camera position then you can move the camera from start to end slowly. You can use this Lerp tutorial for reference.
Unity also provides a visual option called Cinemachine. You can set up two virtual cameras and slowly move the view from one camera to another using the timeline. This doesn't require any coding and is very similar to creating an animation. Here is a getting started guide to Unity Cinemachine.