Hi,
I got a rigidbody bullet which applys damage to an other Rigidbody, when it got hit. But I just want to apply damage, not to push the other Rigidbody away with the bullet. How can I achieve that the hittet rigidbody not get affected by physics because of the collision with the bullet?
You can either make the effected rigidbody a kinematic rigidbody through it’s settings but that would make it so that it won’t get effected by any force at all.
A better option is to make the bullet a trigger instead of a collider to make sure it’s not a solid object that applies force with it’s velocity.
But I think it would be much more optimized if you have used a raycast to determine where the enemy is hit and calculate the damage, show the effects and everything else instead of trying to handle all the rigidbodies and collisions. Check out how Unity did it in the Angry Bots.
Can also set the rigidbody mass. Unity always starts them at 1 (kilo?). A cheap hack is to set the bullet mass to 0.01. That will give 1/100th the pop to what you hit, which might look nice. Or you may want to eventually set all masses to “correct” numbers, and put the bullets at 0.1 (how much do bullets weigh?)