Skip to content

Commit 49256eb

Browse files
committed
fix flipped axes in planar mode
1 parent 4770e65 commit 49256eb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/view.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,10 @@ glm::mat4 computeHomeView() {
293293
}
294294

295295
// Rotate around the up axis, since our camera looks down -Z
296-
R = glm::rotate(R, static_cast<float>(PI), baseUp);
296+
// (except in planar mode, where we look down +Z so default axes are as-expected)
297+
if (style != NavigateStyle::Planar) {
298+
R = glm::rotate(R, static_cast<float>(PI), baseUp);
299+
}
297300

298301
glm::mat4x4 Tobj = glm::translate(glm::mat4x4(1.0), -state::center());
299302
glm::mat4x4 Tcam =

0 commit comments

Comments
 (0)