I have a bouncy rolling ball player that can roll up slopes below a certain angle. It is prevented from automatically rolling down those slopes by changing the direction of gravity to point into the slope while the ball touches the slope. I want the ball to smoothly roll up these slopes, but currently (due to an attached PhysicsMaterial) the ball bounces off the steeper slopes it can roll up for a second when it first touches them (once it lands, the changed gravity kicks in and it rolls just fine). The bounciness of the player cannot be removed, since the ball still needs to bounce off the floor and walls, and so far I have been unable to satisfactorily imitate rebounding without a PhysicsMaterial.
I tried disabling the ball's bounciness on a collision-by-collison basis (using OnCollisionEnter()), but I found out that this was futile, since by the time a collision occurs, the colliding objects have already started bouncing. I also tried using a SphereCast to detect if the ball will hit a rollable slope on the next frame and, if so, disable the bounciness for that frame, but this had no effect.
What should I do to prevent the player from bouncing off these slopes in this way?