# How can I set up a Pong-style game using the physics system in Unity?

I've just been using Unity and chose to learn it by making a Pong game which sounded simple enough as a "hello world" type of game. My goal was to try and encompass enough of the built in engine without needing to write scripts but I ran into a few problems.

Here is my setup so far:

• Box Collider
• RigidBody (Set as Kinematic)

Ball Game Object:

• Sphere Collider<
• RigidBody (not kinematic)

Wall Game Object:

• Box or Plane Collider

I've set my material on my Ball to 'Bouncy' and I get a pretty good bouncing ball (given a starting force).

void OnCollisionEnter(Collision collision)
{
}


Here are some of my problems:

1. Collision: I was trying to figure out why my kinematic objects wouldn't collide before stumbling upon the collision matrix. I was wondering what are good approaches to enable kinematic collisions for my setup;
2. Forces: I'm confused how ApplyForce should be used. Even if I pick ForceMode.Impulse, is that a constant force? I'm a bit stuck on how to get proper bouncing off the walls and paddle. Since I've already applied a starting force, should my wall apply force on an onCollisionEnter method or change the velocity?
• Pong does not impart force based on movement of the paddles, merely directs the ball based on position of the collision relative to the paddle (which is not a realistic effect of a box-shaped paddle). So you should explain what you actually want since "Pong" is not it. – Warwick Allison Sep 22 '11 at 9:13