streets-gl icon indicating copy to clipboard operation
streets-gl copied to clipboard

Implement a bike/car/vehicle mode

Open schuellerf opened this issue 1 year ago • 3 comments

Implements a "bike" or "vehicle" mode. Default speed resembles more a bike. When holding 'shift' the speed is more a car.

Sticks the camera at height 2 from the ground.

Could solve #64

Please note that I'm new to react and the streets-gl code, I hope the code is somewhat usable!

schuellerf avatar Jan 06 '25 21:01 schuellerf

  • Pressing B while using the search field activates bike mode;
  • when I exit the bike mode by either pressing B again or Escape, the camera gets stuck in a strange state.

StrandedKitty avatar Jan 18 '25 17:01 StrandedKitty

@StrandedKitty please check now.

I don't really like to hand over "this" (ControlsSystem) to FreeControlsNavigator and GroundControlsNavigator but I didn't find a better solution :-/

--

The camera jumps back when pressing TAB twice but that was there before :-/

schuellerf avatar Jan 18 '25 18:01 schuellerf

I Just tested a little bit more - when in FreeControls mode and pressing ESC the mouse looses the pointer lock but we are still in FreeControls mode somehow - is this the intended behavior? Maybe that was the strange state you ment? I can also implement when loosing pointerLock (in FreeControls mode) we'll switch to GroundControl mode - if that's ok

(although I might do this in a separate PR - that's actually not related to bike mode)

schuellerf avatar Jan 18 '25 19:01 schuellerf