Gah... i'm confounded.
So here's the problem. I'm trying to apply some basic physics to the collisions in a 2d game but mild inaccuracies in collision detection are causing trouble.
Say you drop a box onto an inclined plane, the box moves (say) 4 units per frame until it penetrates into the plane. Determine the exact point at which it collides and move the box there. Now determine what edges or corners of the box collided with the ground and modify the velocity, force vectors, rotation, etc.
sounds good even though those alone are no simple task.
But I have found that, for instance, if I have a plane for an object to land on, suppose a box lands on it in such a way that it should slide along the surface. Sliding has proved to be extremely horrible for the following reason. An object is walking the very edge of the collision boundaries, if in any calculation of its motion you are off by the slightest decimal value, (and in computer programs, they often are) the object can cross the boundary and it counts as a collision. Also, slight inaccuracies in the variables can cause it to slide slightly above the surface and float into the air. If there is gravity, it keeps it on the ground but then it looks jumpy and jerky as it lightly bounces across the surface.
One solution i considered was to have the collision boundaries slightly inside the visible surface of the objects. That way if the object is sliding nooooot quite parallel to the surface it won't really hurt. BUT if the surface is long enough, the error will accumulate as it slides along.
How on earth do I they handle this?