mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Support reference angle on revolute, prismatic, and weld joints (fixes #1194)
This commit is contained in:
@@ -171,6 +171,13 @@ int w_PrismaticJoint_getAxis(lua_State *L)
|
||||
return t->getAxis(L);
|
||||
}
|
||||
|
||||
int w_PrismaticJoint_getReferenceAngle(lua_State *L)
|
||||
{
|
||||
PrismaticJoint *t = luax_checkprismaticjoint(L, 1);
|
||||
lua_pushnumber(L, t->getReferenceAngle());
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const luaL_Reg w_PrismaticJoint_functions[] =
|
||||
{
|
||||
{ "getJointTranslation", w_PrismaticJoint_getJointTranslation },
|
||||
@@ -191,6 +198,7 @@ static const luaL_Reg w_PrismaticJoint_functions[] =
|
||||
{ "getUpperLimit", w_PrismaticJoint_getUpperLimit },
|
||||
{ "getLimits", w_PrismaticJoint_getLimits },
|
||||
{ "getAxis", w_PrismaticJoint_getAxis },
|
||||
{ "getReferenceAngle", w_PrismaticJoint_getReferenceAngle },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user