I’m trying to mess around with 2D, and I got a bullet to spawn and go into a direction. My issues is that when it hits another player(network), the player that was hit ends up drifting away(and may at times start turning). The other issue is that if the player that fired the bullet ends up walking into the bullet, the bullet disappears. I just want the bullet to hit the player, disappear(and do what other stuff i have for the code) without the player being hit to move.
When two colliders with rigid bodies hit each other, they impact forces on each other. In your case, you most likely want to check the Is Trigger box on the bullet’s collider, which prevents it from causing impacts. Then you would put your code in OnTriggerEnter2D, including having the bullet disappears when it hits something.
To stop your player from turning, check the Rotation in the Constraints setting in your player’s rigid body parameters.
To prevent your player from hitting his own bullet, you could check that the Collider2D given in OnTriggerEnter2D (Collider2D col) on the bullet is not your player (using either name or a tag) before doing your “other stuff”.