Can't change bool while accessing other script
Hi, I've tried several different ways for this... Really need help.
When the Thrombocytes (grey stuff) are in the trigger collider "VesselCollider", it should set bool "vessel" to true in the other script named "Follow" in the "Thrombocyte" GameObject. See pics.
Thing is it doesn't. When I change the bool manually to true, it works, so the rest of the scripts is fine. Just trouble triggering or accessing the boolean...
You can try to debug the other.gameObject and check if it is the vesselCol object?
I put a debug.log to the collision, nothing happens, the trigger sphere (parented to the Thrombocytes), doesn't seem to detect the trigger sphere vesselCol.
Answer by ElijahShadbolt · Nov 15, 2016 at 06:07 AM
I think two trigger colliders do not detect each other. You might have to make one of the triggers (maybe the Thrombocytes one) a collider with an attached rigidbody (maybe set to kinematic) to be able to detect it entering the other trigger.
That will definitely work, thank you.
Didn't know two Triggers don't detect, that could be inconvenient if I wanted larger colliders just for that event, because as not triggers they would collide (obviously) with others objects.
But it's not the case. I'll test it later!!!
If you want a collider to not collide with other objects, you could create a new layer, and in Edit > Project Settings > Physics, untick all the tickboxes for that layer in the Layer Collision $$anonymous$$atrix.
Your answer
Follow this Question
Related Questions
Trigger enabling component works in one statement but not another? 1 Answer
Collider/Trigger script without Rigidbody2D component attached not working 0 Answers
How would I change material properties of a box collider via script? 0 Answers
Triggers colliding with triggers 1 Answer
ui Text not responding to collider 1 Answer