In my scene, I have a Box bbox - which is instantiated from a custom struct -, and an ofEasyCam cam.
// Set camera to isometric-like perspective view
glm::vec3 center = bbox->getCenter(); // center point of a box
double radius = 125.0; // distance between camera and box center
cam.setPosition(center.x, center.y, center.z + radius);
cam.rotateAroundDeg(75, cam.getXAxis(), center);
I rotate and move the camera so that it creates an orthographic-like view, which totally works! However, the mouse interactions now feel unnatural and weird when dragging the mouse from left to right or vis versa.
When I drag the mouse cursor to right the box gets tilted to the left?
The small object that you can see at one of the bottom corners of the box is a plane that has the origin (0, 0, 0), a x-axis (1, 0, 0) and a y-axis(0, 1, 0). It represents the origin and direction of the box in the first place, if that makes sense. bbox is defined by a plane a width, height, and depth.
It is a bit more convoluted than that. when not using relative Y axis, it will use a fixed Y axis set by default to 0, 1, 0. You can set this axis with setUpAxis. This was set as the default mode because it allowed the easy cam to behave in a similar way as how several CAD software cameras work.
When relative axis is set to true, the up axis becomes the cameras local y axis, which changes continuously as the camera moves.
Hm, that’s interesting, because that’s exactly what I was after, meaning CG or CAD software like viewport behaviour, and which now seems to work with your fix. The default y-axis felt weird to me. I’m using CAD a lot.