I am creating a temperature system in my project that is dependent on height (z). I want it to be fully dynamic world so that when you are by the sea it will still snow in the mountains and not be sunny since the player location will be in a hotter area. Likewise I do not want it snowing on the beach when the player is in the -10C weather of the mountains. I for some reason think I am going to have to make another copy of this function for the player location so that they are independent of each other. The player one is more just for the player so they know what the temperature is. The world temperature is what I want to control the whole landscape. Any tips or tricks to make this run better, smarter, or how to solve my question will be greatly appreciated.