Resources on expected behaviour when manipulating 3D objects with the mouse
Posted
by
sebf
on Game Development
See other posts from Game Development
or by sebf
Published on 2011-02-20T12:04:36Z
Indexed on
2011/02/20
15:33 UTC
Read the original article
Hit count: 307
Hello,
In my animation editor, I have a 3D gizmo that sits on the origin of a bone; the user drags the mesh around to rotate the bone.
I've found that translating the 2D movements of the mouse into sensible 3D transforms is not near as simple as i'd hoped.
For example what is intuitively 'up' or 'down'? How should the magnitude of rotations change with respect to dX/dY? How to implement this? What happens when the gizmo changes position or orientation with respect to the camera? ect.
So far with trial and error i've written something (very) simple that works 70% of the time. I could probably continue to hack at it until I made something that works 99% of the time, but there must be someone who needed the same thing, and spent the time coming up with a much more elegant solution.
Does anyone know of one?
© Game Development or respective owner