I have a character and an enemy, when a character touches an enemy, or is in it, he is pushed out of him with the help of AddForce() , but this happens rather slowly, as if you are squeezing toothpaste from a tube.
How to make a character in contact with the enemy sharply repelled from him, but at the same time for a short distance (ie, he sharply "bounced" from the enemy, but not for a long distance), I just need one idea, like to do. I tried to simply enlarge Vector2 in the AddForce() function, but the character flew away to warm edges :)
PS Rigidbody2D and CircleCollider2D hang on both objects.
ForceMode.Impulsesecond parameter, not? - Fat-Zer