Problems with mouse manipulation in GLMakie


maybe I’m simply too untalented, but I am not able to manipulate the MWMesh below with the mouse in such a way that the two colored faces are visible to the left and right. Im able to view it from all other perspectives but not this one. Also sometimes the rotation is counter-intuitive: I make a move with the mouse to the right and the mesh turns to the left…

What am I doing wrong?

    using GLMakie
    vertices = [
        0.0 0.0 0.0;
        1.0 0.0 0.0;
        1.0 1.0 0.0;
        0.0 1.0 0.0;
        0.0 0.0 1.0;
        1.0 0.0 1.0;
        1.0 1.0 1.0;
        0.0 1.0 1.0;
    faces = [
        1 2 3;
        3 4 1;

        5 6 7;
        7 8 5;
    colors = [:red, :red, :red, :red, :blue, :blue, :blue, :blue]
    scene = mesh(vertices, faces, color = colors, shading = false)


The camera has lots of tweaking options, which may help with your issue:

Also @ffreyer is currently reworking the camera.

And there is also a PR for a nice gizmo to better control the camera:

If you could try these out and give feedback, it would greatly help merging those for the next release!

By default the camera restricts rotations in such a way that you can’t make another direction the “up” direction. You can lift this restriction with

f, a, p = mesh(vertices, faces, color = colors, shading = false)
cam = cameracontrols(a)
cam.attributes.fixed_axis[] = false

Independently from the camera you can also rotate the mesh itself with rotate!(p, 0, pi/2, 0)

Thanks very much! Setting fixed axes to false did the trick! I hadn’t tried it before since for me the documentations seems to imply that the default value is false anyway. Is there a reason why it is true by default now?