Avoid varying output on same amount of force applied to a Rigidbody2D.
So I have a Rigidbody2D (bot character) with a polygon collider on it. The shape of the collider resembles a pencil (somewhat). There's another Rigidbody2D with similar shape (the player's character). On collision of player with the bot, I'm applying force on the player.
Each time the force is applied, the behavior is different. Sometimes the force is quite low, and sometimes it is exactly what we want. Can't figure out how we could avoid this, and each time a consistent force is applied.
Are you sure you're not adding for in any 'Update' call as this can lead to frame-rate dependent forces? If you're calling it in the OnCollisionEnter2D you will be okay as this is frame-rate independent.
I presume the Rigidbody2D is a Dynamic body-type? If so the physics system applies its own impulse forces to ensure that its colliders are separated from other colliders it's allowed to contact. $$anonymous$$aybe your forces are opposing/conflicting with those forces?
You haven't detailed directions of collision and the forces you're applying so it's all guesswork here unless you provide more detailed info. The more info you provide, the more likely you'll get an answer.