adding red color for collisions boxes

This commit is contained in:
Clément Le Bihan
2021-06-14 14:41:04 +02:00
parent a36ab11b6d
commit a229452dc4
4 changed files with 22 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ namespace BBM
//draws hitbox
if (dimsComponent) {
RAY::Drawables::Drawables3D::Cube boundingBox(posComponent.position, dimsComponent->bound, WHITE);
boundingBox.setDebugColor(RED);
boundingBox.drawWiresOn(this->_window);
}
//draws models contours
@@ -52,11 +53,11 @@ namespace BBM
if (modelShader)
modelShader->model->setShader(modelShader->getShader());
drawable.drawable->setPosition(pos.position);
if (this->_debugMode)
this->drawBoundingBox(entity, pos, drawable);
drawable.drawable->drawOn(this->_window);
if (modelShader)
modelShader->model->resetShader();
if (this->_debugMode)
this->drawBoundingBox(entity, pos, drawable);
}
this->_window.unuseCamera();