Bouncing problems

First of, Hello everyone! :slight_smile:

Now the troubles! So i am pretty new in unity, but have some coding experience.
To get better in unity i thought well, lets make a “2d” shooter looking from above.

Now my problem is that when i fly my spaceship (a cube atm) with a rigidbody attached on it, into another game object, also with a rigidbody attached to it, it keeps bouncing off.

So what did i try? Well i tried to find some solutions with google.

So first: I created my own Physical Mat, with 0 in bounciness, and 1 in frictions, this should by the documentation work if i understand it right. But it didn’t.

Then i went into project settings / physics, and played with the bounciness threshold, but still bouncing like hell.

At last i tried to play with the OnCollisionEnter/Exit functions without any success, so i deleted them again.
I am really not sure where to look for answers for this one, so i hope you can help me.

Thanks in advance, HolaPie. :sunglasses:

I would say that using a different physic material is the best bet. However, it sounds weird that something with 0 bounciness will still bounce. Is it possible you never actually assigned the physic material to your ship?

Make sure in your physics mat, the bounce is set to “Minimum”. Off the top of my head, I believe Unity takes the average bounciness of the two objects by default.

Yes i am sure :slight_smile:

I did try to set it to minimum, because yes average was used as default. Still didnt help - I will test it some more tommorow and get back to you.

Thanks for the answers!

Would suggest playing around with the relative masses of the rigidbodies until you get the desired effect. (In addition to the other options of course)

Ok i found a solution.

I removed my box collider from my cube, and added a capsule collider instead, now it works.

But again thanks for the help.

Edit: ops double post

Thanks HolaPie. I’ve been having the same frustrations for a while on a fairly simple physics game that I am working on. Setting all my blocks to be sphere coliders helped quite a bit. Glad I stumpled upon this post.