Hacker News new | past | comments | ask | show | jobs | submit login

If I get the grabbing cursor when I press the mouse, I expect the dragging logic. That actually would be good way to make it unambiguous but here it's used wrong.



That's a really good point. Regardless of which style of dragging someone prefers, the grabbing cursor is a clear indication to expect "natural" style dragging.

After all, when you press the button, the fingers close as if they are grabbing something in the scene. In real life, when you grab something and move it, it goes in the direction you move, not the opposite direction.

Someone correct me if I'm wrong, but I believe in large part it's gamers who tend to expect the reverse dragging. I think at this point far more people expect natural dragging as used in most online maps and street views, etc.

360cities used to have the reverse dragging, but I see they have changed it to natural dragging now. Try the panorama on their home page for example:

http://www.360cities.net/

But the other thing I was told about gamers is that they don't expect to drag with the left button, but with the right button.

This suggests a possible solution: a left-button drag can use natural dragging, and a right-button drag can use reverse dragging.

The finishing touch would be to have the cursor change to something other than the closed hand when the right button is down. I'm not sure what a suitable cursor would be, but there must be something - anything other than the closed hand. Maybe a four-way arrow?


While WebVR scenes can be viewed in a browser, their intended target is the vr headset, where the "dragging" is not at issue, and you are turning the view by turning your head. I think it would make more sense to keep the reverse dragging and change the mouse icon here. The intended experience is not "here is a scene that you can drag around" but "here is a virtual scene you are standing in and you can look left and right". So the intended context is that, headset or not, you are controlling the viewers head.


If you want camera-drag with right-click, ideally you'd just hide the mouse (and capture it so it can't leave the bounds of the view). That's normally what games do when they have right-click dragging in the fashion you describe.

That said, I have no idea if JavaScript can capture the mouse like that.


It can! For a capture that lasts until the mouse button is released:

https://developer.mozilla.org/en-US/docs/Web/API/Element/set...

Or for a capture that works even if the mouse button is not pressed, and remains until the Esc key is pressed:

https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Loc...

The first option would be the one to use for right button dragging.


The first one is Firefox only, the second one is everything-except-Safari.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: