Zoom and rotate on mobile devices

30 views
Skip to first unread message

Bruce Sherwood

unread,
Jan 21, 2015, 12:56:45 PM1/21/15
to glowscri...@googlegroups.com
Touch screen inputs are now enabled in GlowScript, making it possible to zoom and rotate the camera.

To zoom: spread or bring together two fingers to zoom in or out.

To rotate: swipe a single finger. If you want to drag an object rather than rotate the camera, press and hold momentarily before dragging.

Occasionally this mechanism locks up and no touch inputs are accepted. I think it has to do with two-fingered zooming followed by slowly releasing one finger at a time, but I'm not sure. If you find a reproducible sequence of touch inputs that causes the lockup, please tell me. Thanks.

This development is quite important for using GlowScript with mobile touch-screen devices, because moving the camera helps enormously in understanding a 3D scene. Classic VPython supports true stereo, but it seems to be the case that camera motion under active user control is as good as or better than true stereo.

Bruce Sherwood

unread,
Jan 22, 2015, 5:13:49 PM1/22/15
to glowscri...@googlegroups.com
Another touch gesture has been added to GlowScript: Touch with two fingers and rotate to rotate the scene around the z axis (the axis pointing out of the screen).

Jeff S

unread,
Mar 8, 2015, 7:28:42 PM3/8/15
to glowscri...@googlegroups.com
On Thursday, January 22, 2015 at 4:13:49 PM UTC-6, Bruce Sherwood wrote:
Another touch gesture has been added to GlowScript: Touch with two fingers and rotate to rotate the scene around the z axis (the axis pointing out of the screen).

Any chance of binding this to Ctrl-Mousewheel events?  That would match behavior of Google Earth and should be non-surprising.
 

Bruce Sherwood

unread,
Mar 8, 2015, 7:35:32 PM3/8/15
to glowscri...@googlegroups.com
Say more? When I try Google Earth on my phone, there is a gesture of two fingers moving in parallel upward -- is that the gesture you mean? It seems to me the same as the GlowScript gesture of simply moving one finger upward.

Jeff S

unread,
Mar 8, 2015, 11:26:36 PM3/8/15
to glowscri...@googlegroups.com
On Sunday, March 8, 2015 at 6:35:32 PM UTC-5, Bruce Sherwood wrote:
Say more? When I try Google Earth on my phone, there is a gesture of two fingers moving in parallel upward -- is that the gesture you mean? It seems to me the same as the GlowScript gesture of simply moving one finger upward.

I mean on a non-touch computer.  Rotation about the forward axis, like the two-finger touchscreen rotation, is not available with a mouse.  Currently, ScrollWheel events zoom in and out, and that should not change.  I'd like to see rotation about the forward axis bound to Ctrl-ScrollWheel events.

I managed to get a rotation on drag working, but it would be nicer to have it on Ctrl-ScrollWheel so that dragging can be freed up for the program.

-Jeff

Bruce Sherwood

unread,
Mar 9, 2015, 12:23:01 AM3/9/15
to glowscri...@googlegroups.com
Thanks; now I see your point. I'm not comfortable with binding this to the scroll wheel, because many mice don't have scroll wheels. Is there something else we could do? Like maybe say that shift-drag does it?

Jeff S

unread,
Mar 9, 2015, 8:31:47 AM3/9/15
to glowscri...@googlegroups.com
I haven't seen a non-scroll mouse for sale for a PC in years, but certainly shift-drag sounds reasonable if it's not used yet.  I'm all for providing functionality regardless of hardware.
But also please bind it to ctrl scroll wheel.

Bruce Sherwood

unread,
Mar 9, 2015, 10:20:42 AM3/9/15
to glowscri...@googlegroups.com
Mac mice typically have no scroll wheel.

Reply all
Reply to author
Forward
0 new messages