CedricGuillemet / ImGuizmo

Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui
MIT License
3.22k stars 907 forks source link

Option to rotate proportionally to mouse delta x/y #250

Open eugeneko opened 2 years ago

eugeneko commented 2 years ago

I think most of the tools (Unity, 3ds Max, Blender?) rotate with fixed speed, e.g. 5 degrees per mouse delta x. While ImGuizmo rotates based on cursor position, therefore it's nearly impossible to precisely rotate object if rotation axis is almost parallel to the screen. Example:

image

How can I implement this feature, so I can maybe make a PR, or, at least, have it for myself?

PS: I genuinelly don't understand how that's not a feature after all these years.

CedricGuillemet commented 2 years ago

starting point : https://github.com/CedricGuillemet/ImGuizmo/blob/e3174578bdc99c715e51c5ad88e7d50b4eeb19b0/ImGuizmo.cpp#L2327