-
Hey guys! I really apprieciate the example files for OpenGL and Imgui, they explain a lot. One thing I try to figure out, is making it possible to rotate 3d models using mouse dragging. In example files there is some sort of a fly mode, which is really cool and helpful, but at the same time for CAD related things rotating it with mouse dragging is much more popular. What I mean by this is something like e.g. this: https://stemkoski.github.io/Three.js/Labeled-Geometry.html I understand library itself is pretty low-level, but maybe any of you have any examples or code samples where you rotate it not by flying with arrows and mouse, but with just dragging the mouse? :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This functionality is a pretty simple algorithm non-specific to any particular code. Simplified algorithm:
|
Beta Was this translation helpful? Give feedback.
-
Just a small note that there is a repo that does that: https://github.com/batu92k/Mouse-Orbit |
Beta Was this translation helpful? Give feedback.
This functionality is a pretty simple algorithm non-specific to any particular code. Simplified algorithm: