- Home /
Player "bumpes" when trying destroy onCollision
I have a game where a player picks up a coin. The onCollision enter part is good and everything works fine except when the player enters the "Sphere Collider" placed on the coin, the player seems to bump in to it for half a second and THEN the object/coin destroys. Why is that? How can I fix this so the "pick up" seems more smooth?
Answer by nypraise · Jul 02, 2013 at 07:50 PM
I solved it by using onTriggerEnter instead and set the object as trigger. :)
Avoiding is not resolving. I am glad you worked it out, but I don't see why the OnCollisionEnter shouldn't work. Get it sorted now, so you can have the collision flags handy when you need to use them. Cheers!
Answer by fueldown · Jul 02, 2013 at 06:37 PM
If you are using character controller for the player, then check it's skin width. This the most likely is the culprit in such cases.