- Home /
Question by
Johan 4 · Mar 19, 2011 at 01:53 AM ·
collisiononcollisionenter
Check if object left a specific collider.
If an object touches another object with tag "box" then the bool box = true.
The problem is that if the objects don't touch, the bool stays true. I need it to change to false if it doesn't touch the object with box tag.
Thanks
Comment
Best Answer
Answer by DaveA · Mar 19, 2011 at 02:40 AM
I take it you've looked at OnCollisionExit?
Yes. I tried to change the box to false in the oncollisionexit but it doesn't seem to do anything
Sounds to me like OnCollisionExit should work =\ have you tried hunting down the problem by making it print something for debug purposes?
Right. Load up on Debug.Log statements and/or hit the debugger. If you wanna post some code we could review it.
Yes it did work, just for some reasons it wasn't working right in the editor.
Your answer
