Bounciness 0 on both objects, bullet still bouncing

Hello,
as the title implies, simple as that.

Both the projectile and the wall have bouniness 0, yet the projectile bounces.
This is the physics material I use for both:
6519784--735427--upload_2020-11-13_11-19-54.png

If you have any idea why this is happening I would be grateful :slight_smile:

6519784--735427--upload_2020-11-13_11-19-54.png

I don’t really know but have you tried it with continuous collision detection ? (don’t forget that with CCD your dynamic object collider must be one of the primitives)

Thanks for the reply.
The collision works well and is detected correctly.

My problem is that after the collision the projectile still bounces.
What I could find is that this could not be related to bounciness actually but to the physics reacting to the collision and applying force that result in the wall repelling the projectile.

A confirmation would be nice :slight_smile:

What I do now is deactivate the projectile at collision (which involves additional coding to handle stuff, like collision effect).

I’m asking because if it’s not CCD there might be a lot of penetration and the projectile might be ejected from inside the body with greater force. With CCD the penetration should be lower. If it is the case than you know what is going on, if not than you must search further.

Thanks for the explanation.
I checked and yes, I set the projectile in “Interpolate” and “Continuous dynamic”.
The wall does not have a rigidbody.

You can try to set the Bounce Combine to Minimum (if you haven’t already tried); but anyway in theory must work also with your actual setup because both objects are without bounciness… but give it a try.

Also can you pause the game and show frame by frame what is happening near the wall?

What you describing, I think I’m experiencing in this thread that I’m about to link. Do you know how to prevent an object being “ejected”?

here’s a link to illustrate what I mean https://discussions.unity.com/t/817519

I think this bounciness you experience is to extreme.
With such a low speed as this character collider you should not penetrate very deep.
Are you sure physics materials are set properly on both colliders ?

Are you referring to my issue? I am able to get into the collider (penetrate) because I’m disabling the collider during player’s motion.

If you disable the collider than naturally you will have deep penetration and then when enabled inside a body you will bounce with a strong velocity.

You’re not quite right.

Apparently, you can prevent that by setting RigidBody’s velocity to 0 before re-enabling collider, that solved my issue.

Thanks all for the replies.
In the end what I do is simply disable the ammo before destroying it.
That works for me:

GameObject effect = Instantiate(CollisionEffect, transform.position, originalOrientation);
Destroy(effect, CollisionEffectTime);
gameObject.SetActive(false);
Destroy(gameObject, CollisionEffectTime);