FIX: Complete Map in Minimap
This commit is contained in:
parent
7476719bb2
commit
c8531c5ea6
@ -62,7 +62,8 @@ void MinimapRenderer::prepareShader() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
glm::mat4 view = glm::lookAt(mapCenter + glm::vec3(0,50,0), mapCenter, glm::vec3(0,0,1));
|
glm::mat4 view = glm::lookAt(mapCenter + glm::vec3(0,50,0), mapCenter, glm::vec3(0,0,1));
|
||||||
glm::mat4 proj = glm::ortho(-mapWidth * 0.5f, mapWidth * 0.5f, -mapHeight * 0.5f, mapHeight * 0.5f, -100.f, 100.0f);
|
float zoom = 1.2f; // >1 = weiter raus, <1 = näher ran
|
||||||
|
glm::mat4 proj = glm::ortho(-mapWidth * 0.5f * zoom, mapWidth * 0.5f * zoom, -mapHeight * 0.5f * zoom, mapHeight * 0.5f * zoom, -100.f, 100.0f);
|
||||||
|
|
||||||
minimapShader.loadViewProjectionMatrix(proj * view);
|
minimapShader.loadViewProjectionMatrix(proj * view);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user