- Home /
Question by
flowerfuneral · Sep 05, 2011 at 12:50 AM ·
reverb
Am I misunderstanding Reverb Zone?
Hi,
What I want is that when the First Person Controller is close to the Reverb Zone, then print out something like "you entered!" However, I can only get one Reverb Zone work correctly and others fail which means only when the First Person Controller is close to the Reverb Zone1, then it prints out and all others won't work.
var alert_zones = GameObject.FindGameObjectsWithTag ("AlertZone");
for (var alert_zone : GameObject in alert_zones)
{
var distance = Vector3.Distance( alert_zone.transform.position, transform.position);
}
if(distance < 20 )
{
print(" enter the Alert Zone!!!");
}
else{
};
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612201855im_/https://answers.unity.com/themes/thub/images/avi.jpg)