changes in orientation while ctrl-left-mouse-drag

Report bugs, bug fixes and workarounds here.
Topic author
timcrews
Posts: 118
Joined: 27.11.2002
With us: 21 years 11 months
Location: Chandler, Arizona

changes in orientation while ctrl-left-mouse-drag

Post #1by timcrews » 28.12.2003, 02:58

Hello:

I typically use ctrl-left-mouse-drag instead of home/end to change my distance from the selected object. I find the display updates to be smoother and more easily controlled. Especially if virtual textures are involved, I often find that home and end drastically "overshoot" the desired distance, while new tiles from the virtual textures are loading. This doesn't happen if I use the mouse controls.

Unfortunately, in the upgrade from 1.3.1 pre-11 to 1.3.1 final, it appears that a new function has bound to the ctrl-left-mouse-drag. Dragging up and down continues to affect the distance from the selected object, as it has for a very long time. But dragging left and right affects the orientation of the selected object.

It is very difficult to move perfectly straight up or down, especially with a track ball. The result is undesired rotation, when all I was trying to affect was the distance. If I start by viewing North America with North being Up, and then zoom closer to North America, chances are I will end up with North being Right or Left instead of Up.

If this new feature had been present in a pre-release, I certainly would have provided feedback on it.

Is there a way to constrain the motion so that I can get only distance changes, without orientation changes? I tried ctrl-shift-left-mouse-drag (knowing that the shift key is used in some graphics program to constrain cursor motion to 45 or 90 degree intervals), but this didn't work.

Tim Crews

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 2 months
Location: Germany

Post #2by Harry » 28.12.2003, 10:48

Rotation is only enabled if your horizontal movement is bigger than your vertical movement, so you don't have to go perfectly up or down to avoid it - everything within 45 degree from vertical should be fine. But I don't know how difficult this is with a trackball :(

alvarezp
Posts: 7
Joined: 09.04.2003
With us: 21 years 7 months
Location: Tijuana, Mexico
Contact:

Post #3by alvarezp » 02.01.2004, 19:37

I can't quite confirm that (normal mouse). I find it very difficult also to get closer or farther without canging orientation, specially that when I need to lift the mouse up to reposition it, the mouse registers some jumps horizontally and it blows it up.

While I find it more accessible, I think it is not bound to the best mouse buttons. I don't know what Shift+Ctrl+Left-button is used for, but something like that would be better.

Harry wrote:Rotation is only enabled if your horizontal movement is bigger than your vertical movement, so you don't have to go perfectly up or down to avoid it - everything within 45 degree from vertical should be fine. But I don't know how difficult this is with a trackball :(
Octavio Alvarez

Topic author
timcrews
Posts: 118
Joined: 27.11.2002
With us: 21 years 11 months
Location: Chandler, Arizona

Post #4by timcrews » 02.01.2004, 19:42

With a trackball, you kind of walk your fingers over the ball to move large distances. With each lifting / pressing of a finger, the trackball apparently moves enough away from vertical to produce an orientation change. It is definitely not possible (for me, at least) to zoom in and out without also getting rotation.

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 2 months
Location: Germany

Post #5by Harry » 02.01.2004, 21:07

alvarezp wrote:I can't quite confirm that (normal mouse). I find it very difficult also to get closer or farther without canging orientation, specially that when I need to lift the mouse up to reposition it, the mouse registers some jumps horizontally and it blows it up.

I understand the problem. However I never encountered it, probably because I use the mouse in a somewhat different way: I simply let the buttons go, reposition the mouse (without lifting it) and then start again. Does this work for you?

I don't know if this is applicable to a trackball.

A couple of possible solutions:
    - make the sensitivity configurable, so people can reduce or disable rotation.
    - change the used buttons by adding a keyboard modifier. However my intention was to make rotation available without using any keys.
    - use a keyboard modifier to avoid rotation

I still think rotation is needed often enough to justify binding it to a movement without any additional keys.

Harald

alvarezp
Posts: 7
Joined: 09.04.2003
With us: 21 years 7 months
Location: Tijuana, Mexico
Contact:

Post #6by alvarezp » 03.01.2004, 06:17

Harry wrote:However I never encountered it, probably because I use the mouse in a somewhat different way: I simply let the buttons go, reposition the mouse (without lifting it) and then start again. Does this work for you?


I didn't get what you mean by "reposition the mouse without lifting it". I guess that would make me go away from planets.
Octavio Alvarez

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 2 months
Location: Germany

Post #7by Harry » 03.01.2004, 10:25

alvarezp wrote:I didn't get what you mean by "reposition the mouse without lifting it". I guess that would make me go away from planets.

Not if you don't press the buttons while you are repositioning it....

alvarezp
Posts: 7
Joined: 09.04.2003
With us: 21 years 7 months
Location: Tijuana, Mexico
Contact:

Post #8by alvarezp » 03.01.2004, 13:03

Nice point.

I don't like it either. :-D My configuration is a 2-button mouse under Windows environment. For some reason, I'm used to get near or far objects by holding down both buttons and dragging. Clicking and unclicking is not an option, since it isn't that easy to click both buttons _exactly_ at the same time you move your object off the center anyway. For speed-when-controlling sake, I realized I tend to move the mouse even before having both buttons clicked. That's the reason I preferred to lift the mouse in 1.3.0 and previous.

I'll try to get used to ctrl+left button, but when you are in a cold environment, one prefers to put a hand away and use only the other one. :-D Now that I mention it, this would make Celestia 1.3.1 a two-hand controlled program, instead of being one-hand-controlled as previous versions. Maybe you needed the keyboard, but usually not at the same time as the mouse.

And _another_ problem when repositioning the mouse by unclicking: The mouse cursor stays in the same position in the Windows environment. Clicking several times makes your cursor gradually go out the Celestia window, since you're moving it away when the button is unclicked and the mouse is moved. This requires adjustments every 3 to 5 clicks or so. Before, I just used numeric 7 or 9 to adjust rotation. It had the problem of having a very big step and thus being difficult to use to position the horizontal of an object in which surface you are, "perfectly" horizontal
Octavio Alvarez

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 2 months
Location: Germany

Post #9by Harry » 03.01.2004, 19:16

I have to admit that I don't entirely understand your point :oops: Anyway, I propose adding the possibility to set the rotation sensitivity in celestia.cfg. You could set the senstivity to 0 and disable this feature competely. Would that be OK?

Harald

alvarezp
Posts: 7
Joined: 09.04.2003
With us: 21 years 7 months
Location: Tijuana, Mexico
Contact:

Post #10by alvarezp » 04.01.2004, 03:54

Haha, I'm sorry. :) It's not that easy. ;) But I guess that making it configurable would be the easiest and most flexible solution. "Therefore, the best" I might add. :) Thanks.
Octavio Alvarez

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #11by chris » 04.01.2004, 06:17

I like having the rotation available, and I'm glad Harald coded this feature. I understand how it could be troublesome for trackball users though--a sensitivity setting in celestia.cfg seems like a reasonable compromise.

--Chris

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #12by Rassilon » 04.01.2004, 23:16

I am actually having a problem with the dragging while using a simple mouse...It seems that even when I have the left mouse button and CTRL held down the engine still wants to move the camera up and down as if the CTRL key isnt pressed...

If you compile the sourcecode add these lines in beginning at the else if on line 806 in celestiacore.cpp

Code: Select all

      // rassilon ~ changed ctrl drag
        else if (checkMask(modifiers, LeftButton | RightButton) ||
                 checkMask(modifiers, LeftButton | ControlKey))
        {
            // Y-axis controls distance (exponentially), and x-axis motion
            // rotates the camera about the view normal.
            float amount = dy / height;
            sim->changeOrbitDistance(amount * 5);
        }
        else if (checkMask(modifiers, LeftButton | RightButton) ||
                 checkMask(modifiers, RightButton | ControlKey))
        {
                Observer& observer = sim->getObserver();
                Vec3d v = Vec3d(0, 0, dx * -degToRad(1.0f));
                RigidTransform rt = observer.getSituation();
                Quatd dr = 0.5 * (v * rt.rotation);
                rt.rotation += dr;
                rt.rotation.normalize();
                observer.setSituation(rt);
        }


It switches the rotation to the right mouse button which in turn fixes the problem for me...As for a trackball...I suppose change to this line of code: Vec3d v = Vec3d(0, 0, ((dx+dy)/2) * -degToRad(1.0f)); and this will allow you to rotate no matter the position of the mouse...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!


Return to “Bugs”