Unrealistic bounce

Hi, i’m coding a minigolf like game, but i’m having difficulties with the bounce. Currently, i’m using a bounce material, but the problem is, when the ball has a really low angle, it will slide on the wall. I tried to then code myself a script, using a wall with a trigger, but I don’t know how to get the “normal vector” of the wall. You see, wall can be vertical, horizontal, curvy, etc., and I can’t (at least I don’t want) create a script for each sitation. So is there a way to get the “normal vector” in a “onTriggerEnter” or a “onCollisionEnter”, or can I create my own physic material to do so? Is there any other way?

Well you can get the contacts in OnCollisionEnter from the collision parameter and that gives you the normal of each contact point.

that sounds promising, i’ll try this, and give a feedback to you. Thanks