private void createPlayerRainWithIntensity(float intensity, RAKPlayer player) { RainScript rain = Instantiate(terrainMaster.getPlayerRainPrefab(), player.transform).GetComponent <RainScript>(); rain.FollowCamera = player.GetComponent <Camera>(); rain.RainIntensity = intensity; }
// Use this for initialization public void Initialize() { player = GetComponentInParent <RAKPlayer>(); if (RAKPlayer.vrPlayer) { trackedObject = GetComponent <SteamVR_TrackedObject>(); transform.localScale = Vector3.one; steamVRController = SteamVR_Controller.Input((int)trackedObject.index); } else { steamVRController = null; } vibrationQueue = new List <VibrationRequest>(); initialized = true; }