Cambios en Camera.

Ahora la cámara hereda de Transformable.
Preparando la "proyección" de Rects respecto a Camera.
Probablemente requiera crear la clase Window para ello.
This commit is contained in:
2022-10-25 20:03:36 +02:00
parent 724807e9f2
commit 08f566fda6
6 changed files with 67 additions and 52 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ public:
{
UE::Renderer* rend = UE::Engine::GetRenderer();
glm::ivec2 mPos(event->button.x, event->button.y);
glm::ivec2 wPos = rend->ScreenToWorldCoords(mPos);
glm::ivec2 wPos = rend->GetCamera()->ScreenToWorldCoords(mPos);
GAME_LOG_TRACE("Posicion del raton: \n\tPantalla: {0}x{1}, Mundo: {2}x{3}: ", mPos.x, mPos.y, wPos.x, wPos.y);
ModificarSprite(wPos);
}