c-frame / aframe-gltf-model-plus

gltf-model-plus component to load glb file with hubs extensions
https://c-frame.github.io/aframe-gltf-model-plus/
Mozilla Public License 2.0
10 stars 4 forks source link

Walkable "Floor plan" a little more strict than from Spoke #31

Open jywarren opened 2 months ago

jywarren commented 2 months ago

I booted up a scene and found that the clearances for walkable floor were a bit more strict - possibly because the "avatar" is larger? Is there a way to relax these? (lol i didn't fit through a doorway).

Thank you!

jywarren commented 2 months ago

Or alternatively when I run into this problem in Hubs i use the g hotkey to enable fly mode, then collisions are turned off.

jywarren commented 2 months ago

Found a workaround, so low priority -- i can double-click to portal ahead quickly.

jywarren commented 2 months ago

Noting the key commands are a little sticky - when i portal ahead, maybe if I haven't released AWDS keys, they get stuck, but pressing them again unsticks them. No big deal but in case others encounter this. TY!

vincentfretin commented 2 months ago

Please note that some features may not be 100% the same than on hubs because I'm using community maintained aframe components as much as possible.

You can click (not double click) on the floor to move, it's using aframe-cursor-teleport.

Currently the navmesh is using Ada's simple-navmesh-constraint, as in the name, it's simple :D You may be able to switch the navmesh engine to aframe-extras's nav-mesh component soon, I wrote a comment about that in https://github.com/networked-aframe/naf-valid-avatars/issues/28#issuecomment-1995591040 but I'm not sure if it's better. We also discussed of another navmesh alternative in https://github.com/c-frame/aframe-extras/issues/441

You can add any shortcut you want in the shortcuts component I wrote in the example that toggle the waypoints with space. I implemented the "g" shortcut to toggle fly mode on https://allocola.com/ You can add the following code if you want that:

          if (evt.code === "KeyG") {
            this.cameraRig = document.querySelector("#rig");
            if (this.cameraRig.getAttribute("movement-controls").fly) {
              this.cameraRig.setAttribute("movement-controls", "fly", false);
              if (this.cameraRig.hasAttribute("simple-navmesh-constraint")) {
                this.cameraRig.setAttribute("simple-navmesh-constraint", "enabled", true);
              }
            } else {
              this.cameraRig.setAttribute("movement-controls", "fly", true);
              if (this.cameraRig.hasAttribute("simple-navmesh-constraint")) {
                this.cameraRig.setAttribute("simple-navmesh-constraint", "enabled", false);
              }
            }
          }
vincentfretin commented 2 months ago

evt.code === "KeyG" is good for azerty (French) and qwerty keyboard layout, it's the physical placement of the key on the keyboard. Otherwise letter g is evt.keyCode === 71. For m shortcut to mute the mic, you definitely want to check the keyCode evt.keyCode === 77 and not the code because on azerty keyboard pressing key m gives code: 'Semicolon'.

I added the g shortcut in https://github.com/c-frame/aframe-gltf-model-plus/commit/9297b3417de66a30015f0c2af3ef2ed119caafbd

jywarren commented 1 month ago

Thank you!!!