mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-22 02:48:25 -05:00
Unhack temporary limitation of camera to horizontal movements
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user