Removed scaling of unit vectors.

This commit is contained in:
Aidan Gauland
2012-04-17 20:54:12 +12:00
parent d4c59d3508
commit 27b62b5c9c
4 changed files with 8 additions and 9 deletions
+2 -2
View File
@@ -61,8 +61,8 @@ namespace box2d
love::luax_assert_argc(L, 1, 1);
b2WorldManifold manifold;
contact->GetWorldManifold(&manifold);
lua_pushnumber(L, Physics::scaleUp(manifold.normal.x));
lua_pushnumber(L, Physics::scaleUp(manifold.normal.y));
lua_pushnumber(L, manifold.normal.x);
lua_pushnumber(L, manifold.normal.y);
return 2;
}
+2 -2
View File
@@ -269,8 +269,8 @@ namespace box2d
b2RayCastOutput output;
if (!fixture->RayCast(&output, input, childIndex))
return 0; // Nothing hit.
lua_pushnumber(L, Physics::scaleUp(output.normal.x));
lua_pushnumber(L, Physics::scaleUp(output.normal.y));
lua_pushnumber(L, output.normal.x);
lua_pushnumber(L, output.normal.y);
lua_pushnumber(L, output.fraction);
return 3;
}
+2 -2
View File
@@ -111,8 +111,8 @@ namespace box2d
b2RayCastOutput output;
if (!shape->RayCast(&output, input, transform, childIndex))
return 0; // No hit.
lua_pushnumber(L, Physics::scaleUp(output.normal.x));
lua_pushnumber(L, Physics::scaleUp(output.normal.y));
lua_pushnumber(L, output.normal.x);
lua_pushnumber(L, output.normal.y);
lua_pushnumber(L, output.fraction);
return 3;
}
+2 -3
View File
@@ -190,9 +190,8 @@ namespace box2d
b2Vec2 scaledPoint = Physics::scaleUp(point);
lua_pushnumber(L, scaledPoint.x);
lua_pushnumber(L, scaledPoint.y);
b2Vec2 scaledNormal = Physics::scaleUp(normal);
lua_pushnumber(L, scaledNormal.x);
lua_pushnumber(L, scaledNormal.y);
lua_pushnumber(L, normal.x);
lua_pushnumber(L, normal.y);
lua_pushnumber(L, fraction);
lua_call(L, 6, 1);
if (!lua_isnumber(L, -1))