How to detect the end of Rigidbody.AddForce?

I am looking at the following:

MonoBehaviour.FixedUpdate - Unity - Scripting API: MonoBehaviour.FixedUpdate()
Rigidbody.AddForce - Unity - Scripting API: Rigidbody.AddForce

I’d like to call audio.Play(); at the end of AddForce so it plays the audio when the rigid body hits the ground/plane.

How to do the above?

Thanks in advance for your help.

AddForce ends right after, it has no continous impact.

but if you want to detect the hit of it against something else, you can use void OnCollisionEnter( … )

I apply AddForce to a rectangular prism. The rectangular prism then falls down. Unity animates when it is falling down.

I tried theOnCollisionEnter() but it played the audio when it starts falling.

I’d like to call audio.Play() right after it hits the ground. How can I do it?

Thanks again.

Check for the collision between the object and the ground in OnCollisionEnter().

I’ve just tried the following C# code:

void OnCollisionEnter(Collision other)
{

if (other.gameObject.name == “ground”)
{
audio.Play();
}
}

Unfortunately, it still does not work. The audio.Play() still happens at the beginning of the anmation(falling down). I’d like to the audio.Play() happens when it hits the ground.

This is a test program. I only have rectangular prism and the ground in the scene.
I am wondering if I am not doing right.

Thanks again.

After debugging further, I think I have a better understanding of my problem now.

BEFORE: I call rigidbody.AddForce() in FixedUpdate() all the time. This is how I see the animation when it is falling.

NOW: I call rigidbody.AddForce() once. Now, it works as expected.

Please correct me if my observation/conclusion above is wrong.

Thanks again for your help.