View Full Version : onCollisionExit not working as expected

08-13-2017, 09:41 PM
I noticed that onCollisionExit isn't firing when it should anymore.

I have an object that has the functions

onCollisionEnter(Table collision_info) and onCollisionExit(Table collision_info) as part of the objects script code.

Used to be when I laid a card on this object, onCollisionEnter would fire and when I picked the card up off the object, onCollisionExit would fire.

Now when I lay a card on this object, onCollisionEnter still fires, and immediately after that onCollisionExit also fires (before I even pick the card up) - When I pick the card up, onCollisionExit no longer fires.

Not sure what's going on here.


08-13-2017, 10:03 PM
Is this tied to the physics mode? If you set it to Full physics does it work correctly, then break if you set it to semi-lock physics?

08-13-2017, 10:25 PM
OK, I set to full Physics mode and now it works as expected (Like it used to work in Semi-Lock Physics mode)

I don't know, is this the expected behavior now - onCollisionExit only works as expected in Full Physics mode?

I liked it when it worked in Semi-Physics Mode



08-13-2017, 11:11 PM
Yeah, I'm afraid this was a change that came about in the move to the newest unity version. Something about how unity handles things coming to rest, I think?

My understanding is it might be a bug we'll have to live with for a while.