- Home /
Question by
user-4347 (google) · Oct 23, 2010 at 09:28 PM ·
gameobjectcollidertriggervariableontriggerenter
Problems with the triggers(not recognized)
In my script it has something easy like this:
var checktrigger = 0; function OnTriggerEnter(other : Collider){ //The other object is moving all the time and in a specific moment pass the gameObject checktrigger = 1; }
The object that has this script is with trigger and the other object do not has trigger but when play the game it never appears in the var checktrigger the number 1.
Please I need recomendations of what i have to do to work.
Comment
@unknown (google): Please stop flagging your posts as "Require $$anonymous$$oderator Attention" just because you want an answer! This is not what flagging posts is for!
Answer by boymeetsrobot · Oct 24, 2010 at 08:27 AM
You have to add a Rigidbody to one of the objects for the OnTriggerEvent to fire.