Hubs-Foundation / hubs

Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.
https://hubsfoundation.org
Mozilla Public License 2.0
2.13k stars 1.41k forks source link

[UX Enhancement] Disable Gravity/Physics #1489

Open flowpoly opened 5 years ago

flowpoly commented 5 years ago

As a user, I can enable gravity/physics from the object's menu, but how do I disable it? Physics

gfodor commented 5 years ago

The main reason I didn't implement the inverse operation is because the button typically will be under the floor once the object has been gravity-enabled, and you can't pick it up to click on it either since gravity is always on, so it seemed like it could be very frustrating (vs just teaching users its not invertible.) there might be a better design tho.

flowpoly commented 5 years ago

@gfodor Oh! So if I am using VR, I can't pick it up due to gravity?

gfodor commented 5 years ago

You can pick it up, but it'll drop as soon as you let go, so there is no way to easily hit the button.

flowpoly commented 5 years ago

If the object's menu was always looking at the user and it was triggered by pressing a button in VR just like in PC (spacebar), could it be possible to add a button that represents 'disable gravity'?

misslivirose commented 5 years ago

I agree that the setting should be able to be reverted - and that changing the menu orientation on objects so that it's not blocked by the ground surface makes sense, so this suggestion is dependent on first addressing #1460.

gfodor commented 5 years ago

yup that makes sense. to be clear when I built this feature the button on the bottom was originally a toggle, and I found it unusable, so in the interest of shipping the "turn on gravity" function I changed it to remove the button as a temporary solution. I agree we should fix the menus somehow so there's no proximity-to-ground dependency on UX.

though I believe the main idea proposed for #1460 may not address that properly -- since doing a cylindrical billboarding will still end up clipping into the floor unless we offset the menu also based upon environmental factors in addition to object and user camera state. we actually don't have a universal way to avoid this kind of clipping easily I don't think, since we'd need to run a bunch of plane intersection tests against the scene or some kind of collision test to push the menu out of the floor. the former is possible in theory but i think potentially slow, and the latter is not possible for all scenes since we can't guarantee accurate physics bodies for a given environment.

gfodor commented 5 years ago

the other approach would be to not avoid the clipping per se but turn the environment transparent or just draw it anyway, but you could run into weird convergence issues or other UX problems -- also perf issues with that. hard to know how bad it would be unless we tried it.