diff --git a/src/hub.html b/src/hub.html index 9344cbe2c88cac105507a960fd62cb3c3bd7a1ec..b935796c02caec4cfeda0a3a7f712ca0b47f0990 100644 --- a/src/hub.html +++ b/src/hub.html @@ -154,7 +154,7 @@ set-yxz-order pinnable > - <a-entity class="interactable-ui" stop-event-propagation__grab-start="event: grab-start" stop-event-propagation__grab-end="event: grab-end"> + <a-entity class="ui interactable-ui" stop-event-propagation__grab-start="event: grab-start" stop-event-propagation__grab-end="event: grab-end"> <a-entity class="freeze-menu" visible-while-frozen="withinDistance: 3;"> <a-entity mixin="rounded-text-action-button" pin-networked-object-button="labelSelector:.pin-button-label; hideWhenPinnedSelector:.hide-when-pinned; uiSelector:.interactable-ui" position="0 0.125 0.01"> </a-entity> <a-entity class="pin-button-label" text=" value:pin; width:1.75; align:center;" text-raycast-hack position="0 0.125 0.02"></a-entity> @@ -171,7 +171,7 @@ super-networked-interactable="counter: #pen-counter;" body="type: dynamic; shape: none; mass: 1;" grabbable="maxGrabbers: 1" - sticky-object="autoLockOnRelease: true; autoLockOnLoad: true; autoLockSpeedLimit: 0;" + sticky-object="autoLockOnRelease: true; autoLockOnLoad: true;" hoverable scale="0.5 0.5 0.5" > @@ -185,7 +185,7 @@ segments-width="16" segments-height="12" ></a-sphere> - <a-entity class="delete-button" visible-while-frozen="withinDistance: 3;"> + <a-entity class="ui delete-button" visible-while-frozen="withinDistance: 3;"> <a-entity mixin="rounded-text-button" remove-networked-object-button position="0 0 0"> </a-entity> <a-entity text=" value:remove; width:2.5; align:center;" text-raycast-hack position="0 0 0.01"></a-entity> </a-entity> @@ -207,7 +207,7 @@ set-yxz-order auto-scale-cannon-physics-body > - <a-entity class="delete-button" visible-while-frozen="withinDistance: 3;"> + <a-entity class="ui delete-button" visible-while-frozen="withinDistance: 3;"> <a-entity mixin="rounded-text-button" remove-networked-object-button position="0 0 0"> </a-entity> <a-entity text=" value:remove; width:2.5; align:center;" text-raycast-hack position="0 0 0.01"></a-entity> </a-entity> @@ -221,7 +221,7 @@ </template> <template id="paging-toolbar"> - <a-entity class="paging-toolbar" visible-to-owner> + <a-entity class="ui paging-toolbar" visible-to-owner> <a-entity class="prev-button" position="-0.3 0 0"> <a-entity mixin="rounded-text-button" slice9="width: 0.2"> </a-entity> <a-entity text=" value:<; width:2; align:center;" text-raycast-hack position="0 0 0.01"></a-entity> diff --git a/src/hub.js b/src/hub.js index e8d69c7b2e297ff03e37df868e16ed94b1be457c..81a821cc3706a80bd1d36480a66e316ce744f088 100644 --- a/src/hub.js +++ b/src/hub.js @@ -115,7 +115,6 @@ import "./components/cardboard-controls"; import "./components/cursor-controller"; import "./components/nav-mesh-helper"; -import "./systems/tunnel-effect"; import "./components/tools/pen"; import "./components/tools/networked-drawing"; diff --git a/src/systems/userinput/bindings/keyboard-mouse-user.js b/src/systems/userinput/bindings/keyboard-mouse-user.js index 9e42e5511ef5639e609b8c9c603032dc39dbfb4d..722847b95c40abc78587f4f6ce9bcaff27ea6d6b 100644 --- a/src/systems/userinput/bindings/keyboard-mouse-user.js +++ b/src/systems/userinput/bindings/keyboard-mouse-user.js @@ -342,5 +342,13 @@ export const keyboardMouseUserBindings = addSetsToBindings({ xform: xforms.noop, priority: 1000 } + ], + + [sets.cursorHoveringOnUI]: [ + { + src: { value: paths.device.mouse.buttonLeft }, + dest: { value: paths.actions.cursor.grab }, + xform: xforms.rising + } ] }); diff --git a/src/systems/userinput/bindings/oculus-touch-user.js b/src/systems/userinput/bindings/oculus-touch-user.js index 99cf3395b1f15401ba897d7b382896a44292e286..771a525da2cf6094c0f56c073d8de8a15d8a9d85 100644 --- a/src/systems/userinput/bindings/oculus-touch-user.js +++ b/src/systems/userinput/bindings/oculus-touch-user.js @@ -687,8 +687,8 @@ export const oculusTouchUserBindings = addSetsToBindings({ [sets.rightHandHoldingInteractable]: [ { - src: { value: rightTriggerPressed2 }, - dest: { value: rightHandDrop1 }, + src: { value: rightButton("grip").pressed }, + dest: { value: paths.actions.rightHand.drop }, xform: xforms.falling, priority: 2 }, diff --git a/src/systems/userinput/resolve-action-sets.js b/src/systems/userinput/resolve-action-sets.js index 7ec2d144025f633c1bac7f59106642425aaac7cf..ab64095f3f1b826d583a694e361e0171b81a7ec8 100644 --- a/src/systems/userinput/resolve-action-sets.js +++ b/src/systems/userinput/resolve-action-sets.js @@ -71,11 +71,18 @@ export function resolveActionSets() { // Cursor cursorController.enabled = !(rightHandTeleporting || rightHandHovering || rightHandGrabbing); + const cursorHoveringOnUI = + cursorController.enabled && + !rightHandTeleporting && + !rightHandHovering && + !rightHandGrabbing && + (cursorHand.has("hover-start") && cursorHand.get("hover-start").matches(".ui, .ui *")); const cursorHoveringOnInteractable = cursorController.enabled && !rightHandTeleporting && !rightHandHovering && !rightHandGrabbing && + !cursorHoveringOnUI && cursorHand.has("hover-start") && cursorHand.get("hover-start").matches(".interactable, .interactable *"); const cursorHoveringOnCamera = @@ -83,18 +90,14 @@ export function resolveActionSets() { !rightTeleporter.active && !rightHandHovering && !rightHandGrabbing && + !cursorHoveringOnUI && (cursorHand.has("hover-start") && cursorHand.get("hover-start").matches(".icamera, .icamera *")); - const cursorHoveringOnUI = - cursorController.enabled && - !rightHandTeleporting && - !rightHandHovering && - !rightHandGrabbing && - (cursorHand.has("hover-start") && cursorHand.get("hover-start").matches(".ui, .ui *")); const cursorHoveringOnPen = cursorController.enabled && !rightHandTeleporting && !rightHandHovering && !rightHandGrabbing && + !cursorHoveringOnUI && cursorHand.has("hover-start") && cursorHand.get("hover-start").matches(".pen, .pen *"); const cursorHoldingInteractable =