updating unit debug renders dynamically

This commit is contained in:
devZoGok
2026-05-26 19:02:48 +03:00
parent 3d3683abf2
commit 2e361d960a
4 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -40,6 +40,8 @@ namespace battleship{
upVec = model->getGlobalAxis(1);
dirVec = model->getGlobalAxis(2);
screenPos = spaceToScreen(pos);
if(hitbox) hitbox->setVisible(Game::getSingleton()->isDebug());
}
void GameObject::placeAt(Vector3 p) {
@@ -71,7 +73,6 @@ namespace battleship{
hitbox = new Node(Vector3(offsetPosTable["x"], offsetPosTable["y"], offsetPosTable["z"]));
hitbox->attachMesh(box);
hitbox->setVisible(Game::getSingleton()->isDebug());
model->attachChild(hitbox);
}