- Home /
Question by
trueicecold · Aug 27, 2014 at 10:04 AM ·
collisionphysicscollision2d
Collision2D not triggering
I have those objects:
Ball - Rigid2Body, Gravity=0, Angular Drag=0, Has a Box Collider 2D with isTrigger=False
Floor - Rigid2Body, Gravity=0, Angular Drag=0, Has a Box Collider 2D with isTrigger=True
in the Floor script I have:
void onTriggerEnter2D(Collider2D target)
{
print("SADSA");
}
when I set the velocity of the ball to overlap/hit the floor, the trigger never occurs... I've tried unity 4.5f and even with Unity 4.6 Beta...
Any ideas?
Comment
Answer by RealMTG · Aug 27, 2014 at 10:21 AM
You need a capital letter on OnTriggerEnter
void OnTriggerEnter2D(Collider2D target)
{
print("SADSA");
}
If it isn't that, tell me.
Dear heavens... such an idiotic mistake that really made me angry with Unity! Thanks Real$$anonymous$$TG, You're a life saver :)