var ObjectsToApear : GameObject;
function OnTriggerEnter (Other : Collider){
if(Other.gameObject.tag == “PlayerEyes”){
( Input.GetButtonDown(“Fire1”) );
ObjectsToApear.active = false;
}
}
Hi all.
I have an object that is linked to the camera, that is a riggid body and Kinematic, so that I can use that object to collide on triggers, instead of the FirstPersonController, now this lets me use an object like eyes, With this method, its posible to interact with object only if your looking at em.
Now the problem is in my scripting ability, wich is Null.
I need the above script to be able to deactivate the object when I am coliding with trigger and LeftClick but it disables when my Eyes object collides with trigger imediatelly.
What do I write in script to say this.
If object (PlayerEyes) is colliding and pres (Fire1)
Disable Object ?
I hope I dont have to use booleans, couse imediatelly f I type in Bool or Boolean, it tells me it dosent know what that is, and neather Do I, So I hope to evade them for now.
Thx for any help.