I created a map and I want to make day/night cycle on the map, but this is going to be fast, sometimes instant. For example, when the player enters a trigger box, the daytime will become night time in 1-2 minutes. Until the player enters the trigger box, the position of the sun will not change and the player should be able to see the transition but this is going to be fast. Other example, when the player enters a tunnel, the daytime will become night time instantly, so when the player exits the tunnel, the environment will be dark. To do this, do I have to use moveable lights? I think, moveable lights are not as optimized as static lights.
Dynamic (movable) lights are definitely the right way to go if you need a day/night cycle. Yes, dynamic lighting can carry significant performance costs, but Fortnight, for example, accomplishes its day/night cycle using totally dynamic lighting. So it can be done.
This is not to say that it’s easy, however. It’s a challenge to create dynamic lighting that:
Looks good at all “hours” of your day’s cycle
Is easy to control (change cycle speed, instantly change to day or night, etc.)
Is performance friendly (e.g. doesn’t destroy your frame rate)
As for how you, specifically, can make your dynamic day/night lighting change quickly from day to night or vice versa, that’s going to depend a lot on how you choose to build your lighting “system.” There’s surely more than one “correct” solution for this problem, but which works best for your project is up to you.
I know this answer lacks specific examples, but I hope it’s helpful nonetheless!