Bounce collision vs. constrained rigidbody

Okay, sort of nooby.

For my first real game I’m trying a Breakout/Arkanoid style thing, and I’m trying to work out the physics of this.

My paddle has a constrained rigidbody, but when the ball collides with that, it absorbs the entire collision. The ball doesn’t bounce back at all.

Everything has a material bounciness of 1, and if I don’t have a rigidbody on it, it’s fine. Except I was using the rigidbody on the paddle to keep it in the bounds of the playfield, and without it, I’m moving the paddle through translate() rather than through its velocity, and I think moving it by velocity will be better for the case when the ball clips the corner of the moving paddle.

So is there an alternate way to constrain the position of the paddle or what should I try to ensure the bounciness of the ball?

After discussion, the answer is:

  1. Set the paddle object as a RigidBody with Kinematic property checked.

  2. Use rigidbody.MovePosition() to control movement of the paddle.

You could constrain the paddle position simply by defining your “left and right” bounds. For instance this would keep the paddle between 0 and 100 along the x-axis:

if(myPaddle.transform.position.x > 100)
  myPaddle.transform.position.x = 100; //you can't set this value like this explicitly but this is just an example code
else if (myPaddle.transform.position.x < 0)
  myPaddle.transform.position.x = 0;

EDIT

After discussion, the answer to the original question is:

  1. Set the paddle object as a RigidBody with Kinematic property checked.

  2. Use rigidbody.MovePosition() to control movement of the paddle.