- Home /
Question by
Arethian · Nov 13, 2015 at 01:55 PM ·
2d gametrigger2d-platformer2d collision
Activate Trigger enable component doesn't work (2d mode.)
Alright, so I'm using the 2d prefab Robot Boy and a large platform he is standing on, to left (positive X) of him/it I have a set up a sprite (Deer) with a square/box collider set to trigger. On that box i've put the Activate Trigger sample code and set it up like this.
Dialogue script is just a code displaying some gui.
When I run it, I make the character walk into the box collider expecting it to be triggered, the trigger count to go up and Dialogue to become ticked. Is that how it should work? If not, how would set this up?
Thanks in advance, Harbinger
unityprob.png
(43.4 kB)
Comment
Answer by upasnavig90 · Feb 16, 2018 at 06:52 AM
Did You add rigidbody2D on the gameObject, which is colliding..?