Page 1 of 1

Scene rotate controls

Posted: 12 Aug 2016, 17:45
by aesylwinn
Here's my current design for instance rotation:
  1. An object can be rotated around the global x, y, or z axis by clicking and dragging on a marker.
  2. An object can be freely rotated around the camera's backward axis when not clicking on a marker and dragging.
  3. The selected object is rotated around the selected axis based on the angle the mouse cursor moves around the center of the view.
It was brought to my attention that only allowing one degree of rotation and rotating around the camera backward axis may not be intuitive. Any thoughts?

If people want to build and try it, here's my branch.

Re: Scene rotate controls

Posted: 12 Aug 2016, 18:07
by DestinedToDie
2. is indeed confusing, not sure I understand.

Question though. Can I set it to rotation mode, set it to z coordinate and then punch in the number 45 (degrees)? I would like the option of punching in numbers instead of dragging mouse because this allows for precision in placing a lot of things. Going into instance menu I get strange numbers on xyz axis rotation that don´t seem to correspond to degrees or radians or anything I know. Also it would be nice if the instance menu wouldn´t have to clutter my space and I could simply do it like in Blender scene - select instance, press r (rotate), press x (axis), 45 (degrees).

Same with object movement. I sometimes click in the wrong place I guess and the object doesn´t get dragged along the correct axis. I would love to be able to select an instance, lock it to Z axis and drag it down.

Is this already implemented and I haven´t noticed, planned to be implemented in the future or are we going for something different?

Btw awesome that we might have rotation soon. I feel like we´re only a couple features away from OpenMW-CS being preferrable over vanilla CS.

Re: Scene rotate controls

Posted: 12 Aug 2016, 19:28
by aesylwinn
2 is similar to the behavior that blender uses if you press 'r' once.
Going into instance menu I get strange numbers on xyz axis rotation that don´t seem to correspond to degrees or radians or anything I know.
It is represented in Euler angles (in radians).

Code: Select all

osg::Quat xr = osg::Quat(-euler[0], osg::Vec3f(1,0,0));
osg::Quat yr = osg::Quat(-euler[1], osg::Vec3f(0,1,0));
osg::Quat zr = osg::Quat(-euler[2], osg::Vec3f(0,0,1));
return zr * yr * xr;
The version we use is first rotated around the x-axis, then the y-axis, then the z-axis.
Question though. Can I set it to rotation mode, set it to z coordinate and then punch in the number 45 (degrees)? I would like the option of punching in numbers instead of dragging mouse because this allows for precision in placing a lot of things... Same with object movement. I sometimes click in the wrong place I guess and the object doesn´t get dragged along the correct axis. I would love to be able to select an instance, lock it to Z axis and drag it down.
I think it may be a good idea to add some shortcuts for moving/rotating with or around a specific axis. The ability to punch in numbers sounds nice, but to be honest, I don't think it would be simple to implement because you would have to change the way input currently works (which is not something I want to do again).

This feature is currently under development with along with instance scaling.

Re: Scene rotate controls

Posted: 13 Aug 2016, 17:15
by aesylwinn
Well, it looks like I'll be redesigning the controls for rotation.

Re: Scene rotate controls

Posted: 15 Aug 2016, 21:35
by aesylwinn
Free rotation now works as follows:
  • Moving the cursor horizontally rotates the object left/right from the perspective of the camera.
  • Moving the cursor vertically rotates the object up/down from the perspective of the camera.
  • There is no direct control to roll the object from the perspective of the camera.

Re: Scene rotate controls

Posted: 16 Aug 2016, 05:49
by DestinedToDie
Sounds good.

Re: Scene rotate controls

Posted: 17 Aug 2016, 17:20
by aesylwinn
At the moment, I don't feel up to adding the shortcuts for axis locking, so I've added it to the tracker.

Re: Scene rotate controls

Posted: 22 Aug 2016, 13:19
by DestinedToDie
Just tried out an Ace´s nightly and damn it´s so good to rotate stuff without having to punch in numbers in a third window. I´m really happy to have it.

Re: Scene rotate controls

Posted: 23 Aug 2016, 01:21
by aesylwinn
I'm glad the feature's useful. :)