- Home /
4.5.2 animation BUG: 2D collider colliding with 2d trigger!!!
I've been developing my game for months now and only after i updated to the new unity version do i have this bug.
Basically I'm shooting a 2d bullet sprite with a 2D collider on it into a 2d collider sprite zombie.
The bullet collides as its supposed to and a sprite animation plays within which i set the zombie sprite collider isTrigger to TRUE.
BUT HERES THE BUG!!! If i shoot another 2d collider bullet sprite into the zombie sprite which is now a trigger collider, A COLLISION STILL OCCURS!!! AND KEEPS OCCURRING NO MATTER HOW MANY TIMES I SHOOT AT THE TRIGGER!
I've spent hours trying to figure WHY THIS IS HAPPENING and my only conclusion is that it's a BUG. This did not happen in any previous version...
I did a bunch of testing and narrowed it down to the animation window, when my zombie sprite dies it plays an animation which changes the collider to TRIGGER at a certain keyframe.
I placed a debug log function returning trigger status in the zombie script and it showed that the collider was TRIGGER(and the inspector as well), the bullet STILL COLLIDED WITH THE ZOMBIE SPRITE!!!
I even tried creating a new animation clip that only changed the collider to trigger and nothing else, so when i first shot the zombie it was set to trigger, but the second shot STILL HIT IT!!!
I'm going crazy over here, i just dont see how this is anything other than a bug...
and to add fuel to the BUG fire, i tried changing the collider to trigger by CODE and it WORKED! then i tried the animation method again and once more a collision occured...
Can anyone confirm? thanks.
UPDATE:
OK I loaded an older version of the game from 2 months ago when I knew 100% the bug didnt occur, and LO AND BEHOLD THE COLLISION STILL HAPPENS!
I'm now a 100% certain that this is a bug in the new version related to setting the rigidbody trigger in the animation window.
I don't want to send my whole project as a bug report, is there an easier way to let Unity know?
Can this possibly have to do with the extra settings in the physics2D options? maybe im not understanding something.
$$anonymous$$an, I'd swear I read days ago something about a change in colliders vs triggers in 2D on the latest 4.5.x versions, but I can't find what nor where :( Anyway, have you tried the latest beta in http://forum.unity3d.com/threads/unity-patch-releases.246198/ ? See if there's some change in there, but I tell you I remember some release note saying something that could be related to what you are experiencing...