Hello everyone,
I have a weird issue with OnCollision2D.
I’ve setup my player with a 2D collider, I’ve also setup the ground he is walking on with a 2D collider.
The player also has a 2D rigidbody on it, the ground does not.
The player script (attached to the player) has 2 OnCollision2D methods, OnCollisionStay2D and OnCollisionExit2D.
The player also has an animator that animates its sprite.
At that point, everything is working fine, both OnCollision2D methods are being called.
Then, I added another animation to the character.
In that animation, I’m also animating the colliders (changing their shape and size).
As soon as I added this new animation, both of the OnCollision2D methods stopped working, even before I’m calling the new animation.
If I disable the Animator component on the player, then the methods are working again.
Any ideas?