Quantcast
Channel: Questions in topic: "issue"
Viewing all articles
Browse latest Browse all 827

Issue with OnTriggerEnter.

$
0
0
So for some reason my script won't work and I can't figure out why. It is meant to show and hide a plane depending if its in the water or not. Thanks in advance for your help. #pragma strict var Showing : boolean; function Start () { renderer.enabled = false; Showing = false; } function Update () { DisableRendererWithDelay(); } function OnTriggerEnter (other : Collider) { if (other.CompareTag("Water")) { Showing = true; } } function DisableRendererWithDelay() { if (Showing == true) { renderer.enabled = true; yield WaitForSeconds(5); renderer.enabled = false; } }

Viewing all articles
Browse latest Browse all 827

Trending Articles



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