Scene rotate controls

Involved development of the OpenMW construction set.
Post Reply
aesylwinn
Posts: 211
Joined: 14 Dec 2015, 20:30

Scene rotate controls

Post by aesylwinn » 12 Aug 2016, 17:45

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.

User avatar
DestinedToDie
Posts: 1050
Joined: 29 Jun 2015, 09:08

Re: Scene rotate controls

Post by DestinedToDie » 12 Aug 2016, 18:07

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.

aesylwinn
Posts: 211
Joined: 14 Dec 2015, 20:30

Re: Scene rotate controls

Post by aesylwinn » 12 Aug 2016, 19:28

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.

aesylwinn
Posts: 211
Joined: 14 Dec 2015, 20:30

Re: Scene rotate controls

Post by aesylwinn » 13 Aug 2016, 17:15

Well, it looks like I'll be redesigning the controls for rotation.

aesylwinn
Posts: 211
Joined: 14 Dec 2015, 20:30

Re: Scene rotate controls

Post by aesylwinn » 15 Aug 2016, 21:35

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.

User avatar
DestinedToDie
Posts: 1050
Joined: 29 Jun 2015, 09:08

Re: Scene rotate controls

Post by DestinedToDie » 16 Aug 2016, 05:49

Sounds good.

aesylwinn
Posts: 211
Joined: 14 Dec 2015, 20:30

Re: Scene rotate controls

Post by aesylwinn » 17 Aug 2016, 17:20

At the moment, I don't feel up to adding the shortcuts for axis locking, so I've added it to the tracker.

User avatar
DestinedToDie
Posts: 1050
Joined: 29 Jun 2015, 09:08

Re: Scene rotate controls

Post by DestinedToDie » 22 Aug 2016, 13:19

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.

aesylwinn
Posts: 211
Joined: 14 Dec 2015, 20:30

Re: Scene rotate controls

Post by aesylwinn » 23 Aug 2016, 01:21

I'm glad the feature's useful. :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest