- Home /
 
               Question by 
               Im-Brazilian · Mar 01, 2014 at 11:07 PM · 
                textdisplayifnear  
              
 
              Show GUI if it's is near or if collide
Hello All,i'm doing an FPS with a car! and i have a question.How to appear(show) a GUIText on the screen but my script is not working. Here is my script :
     var car: Transform;
     var guitext : GUIText;
     function Update () {
     var dist : float = Vector3.Distance(car.position, transform.position);
     if(dist<7){
     guitext.text="Press [E] To enter vehicle!";
     }
     else
     {
     guitext.text="";
     }
     }
But it is not working :( the guitext is in the screen if dist > 7 or if dist < 7 please someone can help me?
if the script you will send me is the same, please send the collide script !
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                