Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class fog_control : MonoBehaviour {
- public float density = 0;
- public Color fogcolor = Color.blue;
- public bool fogstate = true;
- private void OnTriggerEnter(Collider other)
- {
- if(other.tag == "Player")
- {
- RenderSettings.fogColor = fogcolor;
- RenderSettings.fogDensity = density;
- RenderSettings.fog = fogstate;
- }
- }
- }
Add Comment
Please, Sign In to add comment