mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
fix transform:set_pos
This commit is contained in:
parent
a105a4f2c7
commit
ee768f878c
3 changed files with 13 additions and 5 deletions
|
|
@ -9,7 +9,9 @@ static int l_transform_get_pos(lua::State* L) {
|
|||
|
||||
static int l_transform_set_pos(lua::State* L) {
|
||||
if (auto entity = get_entity(L, 1)) {
|
||||
entity->getTransform().setPos(lua::tovec3(L, 2));
|
||||
auto vec = lua::tovec3(L, 2);
|
||||
entity->getTransform().setPos(vec);
|
||||
entity->getRigidbody().hitbox.position = vec;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue