question about bouncing physics material

Hi,
In the scene I have a cube and a wall. I want the cube to be reflected back when it collides with the wall, so I added a bouncing physic material to the cube, and disabled the gravity of its rigidbody. Furthermore I added a script to the cube and used rigidboy.Addforce (0,0, -2) to the cube.
On the play the cube moves and reflect when it collides with the wall, but when it reaches to its initial position it begins to return back to the wall again as if there is a gravity (z-axis) which is pulling the cube back to the wall. I don’t know how to get rid of this issue. I want my cube to reflect back and keep moving in opposite direction infinitely.
Does anyone know the solution to this problem?

Sounds like you have AddForce in your update so you are continually adding -2 to the Z.

Oh, yeah, I got it. I made a onCollisionEnter function and made the AddForce 0 , 0 , 0 upon the collision of cube to the wall which it solved the problem :wink: