mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update drop-item model
This commit is contained in:
parent
48b5be6bc9
commit
7c5f8107de
4 changed files with 98 additions and 33 deletions
|
|
@ -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}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue