How to make a ball bounce always to the same height?

Hello.
My ball has a bounciness of one. Still every time it hits the ground it bounces a little higher than it was before. I want it to return to the same height every time it bounces and I’ve tried to use different things for the ball to bounce off from but the same problem occurs every time. All fricitions, gravity etc. supposely have the default values as I’ve just downloaded Unity and started a new project.

WHAT TO DO?

@sipinii

After digging around the forums I found the answer posted by jeffreyschoch (link at the bottom).

On the ball, set your Collision Detection to “Continuous” (it defaults to “Discrete”). I left Interpolate at “None”. I tested and it works great!

https://forum.unity3d.com/threads/my-ball-bounces-rebounds-on-the-paddle-without-physics-material.410009/

After some testing my physics object has bounce combine set to maximum, friction to minimum and bounciness to 0.9805824, its not perfect but this is pretty darn close to a perfect bounce, even if left an object to bounce for an hour it will pretty much and no visible difference even zoomed in.

I have found that, for whatever reason, attaching this script to the ball cause it to bounce back to the same height, even when Collision Detection is set to Discrete:

using UnityEngine;

public class Bounce : MonoBehaviour
{
    private Vector3 vPrevPos;
    void FixedUpdate()
    {
        vPrevPos = transform.position;
    }
    void OnCollisionEnter(Collision c)
    {
        transform.position = vPrevPos;
    }
}

The condition I use is to drop the ball onto the plane from 5 units above it and let the ball bounce for 15 minutes, then confirm that the maximum height of the ball is still 5 units. I use Physics Material with friction of 0 and bounciness of 1 on both the ball and the plane, and make sure that drag on Rigidbody component of the ball is 0. I use Unity version 2019.4.16f and 2020.3.30f.

Hi, I have the same problem, but I want my object to bounce higher then the 1 bounciness setting and still keep the bounce height the same.
Does anyone know the solution for that?