Unhack temporary limitation of camera to horizontal movements

This commit is contained in:
Alexander Bock
2014-10-07 23:25:46 +02:00
parent 96853d579b
commit 24e1d8f176
+1 -1
View File
@@ -268,7 +268,7 @@ void InteractionHandler::trackballRotate(int x, int y) {
glm::vec2 mousePos = glm::vec2((float)x/width, (float)y/height);
mousePos = glm::clamp(mousePos, -0.5, 1.5); // Ugly fix #1: Camera position becomes NaN on mouse values outside [-0.5, 1.5]
mousePos[1] = 0.5; // Ugly fix #2: Tempoarily only allow rotation around y
//mousePos[1] = 0.5; // Ugly fix #2: Tempoarily only allow rotation around y
glm::vec3 curTrackballPos = mapToTrackball(mousePos);
// LDEBUG(mousePos.x << ", " << mousePos.y << " = " << curTrackballPos.x << ", " << curTrackballPos.y << ", " << curTrackballPos.z);