# HG changeset patch # User nireco # Date 1227562560 0 # Node ID 29c3d91cad82a0a1fbe26cea7d5e020f307fe2fc # Parent c9b96dcfe4ee970eba8e37b0d3e6fa86fef0e935 dot production diff -r c9b96dcfe4ee -r 29c3d91cad82 src/proto2/Physics.cc --- a/src/proto2/Physics.cc Mon Nov 24 21:32:41 2008 +0000 +++ b/src/proto2/Physics.cc Mon Nov 24 21:36:00 2008 +0000 @@ -341,8 +341,8 @@ */ void PhysicsObject::bounce (Vector normal) { Vector tangent(normal.y, -normal.x); - Vector tprojection = (velocity * tangent) / tangent.length(); - Vector nprojection = (velocity * normal) / normal.length(); + Vector tprojection = (velocity * tangent)*tangent / (tangent.length()*tangent.length()); + Vector nprojection = (velocity * normal)*normal / (normal.length()*normal.length()); velocity = tprojection - nprojection; }