mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Removed scaling of unit vectors.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user