update drop-item model
This commit is contained in:
@@ -119,7 +119,14 @@ static int l_set_enabled(lua::State* L) {
|
||||
|
||||
static int l_get_size(lua::State* L) {
|
||||
if (auto entity = get_entity(L, 1)) {
|
||||
return lua::pushvec3(L, entity->getRigidbody().hitbox.halfsize * 2.0f);
|
||||
return lua::pushvec3_arr(L, entity->getRigidbody().hitbox.halfsize * 2.0f);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_set_size(lua::State* L) {
|
||||
if (auto entity = get_entity(L, 1)) {
|
||||
entity->getRigidbody().hitbox.halfsize = lua::tovec3(L, 2) * 0.5f;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -199,5 +206,6 @@ const luaL_Reg rigidbodylib [] = {
|
||||
{"get_vel", lua::wrap<l_get_vel>},
|
||||
{"set_vel", lua::wrap<l_set_vel>},
|
||||
{"get_size", lua::wrap<l_get_size>},
|
||||
{"set_size", lua::wrap<l_set_size>},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user