mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
add Transform.dirty flag
This commit is contained in:
parent
df39a9a8f3
commit
d4460928e5
5 changed files with 29 additions and 10 deletions
|
|
@ -51,7 +51,7 @@ static int l_get_pos(lua::State* L) {
|
|||
|
||||
static int l_set_pos(lua::State* L) {
|
||||
if (auto entity = get_entity(L, 1)) {
|
||||
entity->getTransform().pos = lua::tovec3(L, 2);
|
||||
entity->getTransform().setPos(lua::tovec3(L, 2));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ static int l_get_rot(lua::State* L) {
|
|||
|
||||
static int l_set_rot(lua::State* L) {
|
||||
if (auto entity = get_entity(L, 1)) {
|
||||
entity->getTransform().rot = lua::tomat4(L, 2);
|
||||
entity->getTransform().setRot(lua::tomat4(L, 2));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue