AddForce(1, 0, 1) creates Velocity in y direction. Why?


I am currently working on a ball physics game. Balls(spheres) are placed on a round Playfield (Cylinder) and can be shot around. Imagine, physics of a pool game.

I am using AddForce method to get the spheres moving.

The spheres should only move in X and Z direction while on the playfield and should fall off when rolling out of the playfield.

Typical AddForce command would be:

ballRigidBody.AddForce(new Vector3(56, 0, 78), ForceMode.Impulse);

This works fine in most of the cases but in 1 out of 10 cases i get a positive velocity in the y direction. This does not make sense to me, since no force is added in the y direction. It happens when Addforce values get quite high. It looks to me as if the Sphere bounces off the playfield.

I know i could freeze position in y direction but as mentioned earlier, the spheres should fall down when leaving the playfield and freezing y direction would stop this from happening.

Any ideas suggestion why this is happening?


I believe AddForce works in local directions. So if the spheres are rolling, then their idea of “forward” will change. So at some point they may just be facing in a direction that adding your force to them goes towards global positive y, but their idea of forward if that makes sense.