Quantcast
Channel: Latest Questions by TheGeekyDead
Viewing all articles
Browse latest Browse all 22

New Camera ignores my flashlight,. (No Errors)

$
0
0
Ok so i made this java script and attacked it to my Blackout_object. It works great i walk into the Collider and the "power Outage Sound" plays and the screen goes black. I walk out the lights come back on yadda yadda. Only issue is i cannot see my players flashlight anymore (While on Camera 2), i can see lens flares seem to appear just not the flashlight > Spotlight. I can walk around using the flairs to guide me but i need the flashlight not to be affected by the Camera2. var MainCamera : Camera; var MainCamera2 : Camera; var SoundOutage : AudioClip; var SoundPowered : AudioClip; function Start() { MainCamera.enabled = true; MainCamera2.enabled = false; } function OnTriggerEnter(other : Collider) { if(other.tag == "Player") { MainCamera.enabled = !MainCamera.enabled; audio.PlayOneShot( SoundOutage ); MainCamera2.enabled = !MainCamera2.enabled; } } function OnTriggerExit(other : Collider){ MainCamera.enabled = !MainCamera.enabled; audio.PlayOneShot( SoundPowered ); MainCamera2.enabled = !MainCamera2.enabled; } // On Camera2, i have it set like this. // Clear Flags - Solid Color // Background - Black // Culling Mask - Nothing Everything works great, just wondering how to allow the flashlight object to be seen? It's Tagged: Flashlight. Thanks in advance.

Viewing all articles
Browse latest Browse all 22

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>