mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +02:00
Remove the unnecessary transform arguments to Fixture:rayCast that some idiot blindly copy/pasted from Shape:rayCast
This commit is contained in:
@@ -268,15 +268,11 @@ namespace box2d
|
|||||||
float p2x = Physics::scaleDown((float)luaL_checknumber(L, 3));
|
float p2x = Physics::scaleDown((float)luaL_checknumber(L, 3));
|
||||||
float p2y = Physics::scaleDown((float)luaL_checknumber(L, 4));
|
float p2y = Physics::scaleDown((float)luaL_checknumber(L, 4));
|
||||||
float maxFraction = (float)luaL_checknumber(L, 5);
|
float maxFraction = (float)luaL_checknumber(L, 5);
|
||||||
float x = Physics::scaleDown((float)luaL_checknumber(L, 6));
|
int childIndex = (int)luaL_optint(L, 6, 0);
|
||||||
float y = Physics::scaleDown((float)luaL_checknumber(L, 7));
|
|
||||||
float r = (float)luaL_checknumber(L, 8);
|
|
||||||
int childIndex = (int)luaL_optint(L, 9, 0);
|
|
||||||
b2RayCastInput input;
|
b2RayCastInput input;
|
||||||
input.p1.Set(p1x, p1y);
|
input.p1.Set(p1x, p1y);
|
||||||
input.p2.Set(p2x, p2y);
|
input.p2.Set(p2x, p2y);
|
||||||
input.maxFraction = maxFraction;
|
input.maxFraction = maxFraction;
|
||||||
b2Transform transform(b2Vec2(x, y), b2Rot(r));
|
|
||||||
b2RayCastOutput output;
|
b2RayCastOutput output;
|
||||||
if (!fixture->RayCast(&output, input, childIndex))
|
if (!fixture->RayCast(&output, input, childIndex))
|
||||||
return 0; // Nothing hit.
|
return 0; // Nothing hit.
|
||||||
|
|||||||
Reference in New Issue
Block a user