activityworkshop / GpsPrune

GpsPrune is a map-based application for viewing, editing and converting coordinate data from GPS systems.
GNU General Public License v2.0
72 stars 21 forks source link

Mouse cursor in 3D view makes map to tilt #34

Closed jose1711 closed 3 years ago

jose1711 commented 3 years ago

It's best demonstrated by video - making small circles with mouse is tilting the view. Is there a way how to reset view or avoid this behaviour?

https://user-images.githubusercontent.com/1406222/113492417-782c9800-94d7-11eb-93ae-4c53f7fc66ea.mp4

activityworkshop commented 3 years ago

That's correct, it's the standard way the mouse works using the "OrbitBehavior" provided by Java3d. I agree it can take some getting used to, but once you're familiar with it you can rotate it back by dragging in circles in the opposite direction.

I guess what you want is to restrict this rotation to only two of the axes instead of all three? If there's a patch available to provide this, I would be happy to know about it.

jose1711 commented 3 years ago

Thank you for confirming. Instead of changing the behaviour (which would probably be difficult) is there a way to reset to the original view?

activityworkshop commented 3 years ago

To be honest I don't know whether changing the behaviour would be difficult or not. I'm just used to the current way now (you can see the rotation you talk about in the youtube video here: https://www.youtube.com/watch?v=DJQfEUwfuZ0 ) but I agree if one of the rotation axes could be clamped that would make it more friendly and intuitive. Please just practice a bit, try dragging small clockwise circles and small anticlockwise circles to get a feeling for how it behaves as it is. Maybe you can get used to it?

I don't know if the OrbitBehavior in Java3d can be modified, or replaced by a different Behavior object, maybe someone can help here? Otherwise the best solution would be replacing Java3d with some other alternative that's a bit more maintained (1.5.2 is really old now but still the latest for some platforms) or a bit more Mac-friendly or a bit easier to install... again, any suggestions are welcome. It could be that the catchily-named "lwjgl" might be enough, but obviously there would be some effort required to switch.

I don't think your suggestion of a "reset view" button would help you very much - either you're able to rotate the model as you wish just using the mouse (in which case you can just rotate back to the original angles yourself) or you're unable to get the rotation to work the way you want (in which case it'll get rotated wrongly again next time you try it after the reset). Maybe what you actually want is an additional set of on-screen controls which will let you specify the rotation angles without dragging with the mouse? I'm thinking maybe a slider control (like the one for the map opacity) for the yaw angle (rotation about a vertical axis from 0 to 360) and a second one for the tilt angle (from 0 to 90) towards the camera. How could that look, do you think?

jose1711 commented 3 years ago

My main problem with the way is that I no longer feel I am in control. I am doing some Mr. Miyagi-like motions with my mouse hoping I will achieve the view I want. And maybe as you're saying: practice makes perfect. But let's consider a hypothetical situation you want to open several gpx tracks one after another and make a 3D view from the same angle. That would be hardly possible with the current approach.

I'm thinking maybe a slider control (like the one for the map opacity) for the yaw angle (rotation about a vertical axis from 0 to 360) and a second one for the tilt angle (from 0 to 90) towards the camera. How could that look, do you think?

I like the idea because this would make all the transformations very predictable and reproducible (provided you'd see the actual values for each axis). But maybe it needs some feedback from a wider audience..

activityworkshop commented 3 years ago

Please take a look at this test jar to see if it more closely matches what you expect: https://gpsprune.activityworkshop.net/gpsprune_20.4_test.jar If you like it, this can become the new behaviour in 20.4.

jose1711 commented 3 years ago

Thank you, it feels a bit weird that left and right button does the some thing but otherwise I very much enjoy this new behaviour!

activityworkshop commented 3 years ago

Ah, yes you're right! The right button used to "pan" the view around, but I never used it much so I didn't notice that it has stopped working. Thanks for the tip. Before, this was out of my control but now it becomes fixable :)

activityworkshop commented 3 years ago

improved with 20.4

jose1711 commented 3 years ago

Thank you, works great now.