really bad controls

This commit is contained in:
2023-06-04 13:02:41 +02:00
parent 051c9d8744
commit 41f8c152eb
3 changed files with 9 additions and 19 deletions

View File

@@ -86,15 +86,12 @@ void Renderer::Resize(int width, int height) {
}
void Renderer::SetZoom(float zoom) {
m_WorldShader->Start();
//m_WorldShader->SetZoom(zoom);
m_EntityShader->Start();
//m_EntityShader->SetZoom(zoom);
m_Camera.CamPos.y = std::max(1.0f, m_Camera.CamPos.y + zoom);
}
void Renderer::SetCamMovement(const Vec2f& mov) {
m_Camera.CamPos.x += mov.x;
m_Camera.CamPos.y += -mov.y;
m_Camera.CamPos.x -= mov.x / m_Camera.CamPos.y * 5000.0f;
m_Camera.CamPos.z -= mov.y / m_Camera.CamPos.y * 5000.0f;
SetCamPos(m_Camera.CamPos);
}