Adjust camera height relative to underlying "walk on" surface

Hey @Cob_KYU this functionality allows to set default (fixed) height for views only. (as @eivind has noticed) I believe the thing you are looking for is to disable movement keys.

The viewer doesn’t allow to disable some controls explicitly, but you can achieve this by capturing JavaScript key down events, and not propagating them further for keys that you would like to disable.

You can disable vertical movement keys by adding this code:

<script>
   function onKeyDown(event) {
    switch (event.keyCode) {
      case 34: // page down
      case 81: // e
      case 33: // page up
      case 69: // q
        event.stopPropagation();
        break;
    }
  }

  document.addEventListener('keydown', onKeyDown, true);
</script>

For the record, this snippet was made by @jan Hide some controls or all controlls temporary

1 Like