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

Feature Request - Camera Movement: Vehicle Mode

Open NilsBaumgartner1994 opened this issue 1 year ago • 12 comments

Hi there,

just found this nice project and realy like it :-) What i would find funny is having a small car and be able to "drive" around.

Cheers and keep working on this nice project.

NilsBaumgartner1994 avatar May 06 '23 23:05 NilsBaumgartner1994

Or "fly" with a small plane around

NilsBaumgartner1994 avatar May 06 '23 23:05 NilsBaumgartner1994

I think the main thing that is needed for this to work (as an MVP, at least) is the ability to rotate the view, i.e. change the direction the camera is pointing, rather than rotating the camera's position around the current view center (aka "orbiting"), which is the current behavior.

Most web-based OSM 3D viewers support the latter; a couple (Cesium and OSM Go) support the former; only Cesium supports both simultaneously. Details can be see in the table at the 3D page in the OSM wiki.

waldyrious avatar May 07 '23 09:05 waldyrious

Yes, that seems correct. Would be happy to see this tiny little feature :-)Beste Grüße,Nils BaumgartnerAm 07.05.2023 um 11:58 schrieb Waldir Pimenta @.***>: I think the main thing that is needed for this to work (as an MVP, at least) is the ability to rotate the view, i.e. change the direction the camera is pointing, rather than rotating the camera's position around the current view center (aka "orbiting"), which is the current behavior. Most web-based OSM 3D viewers support the latter; a couple (Cesium and OSM Go) support the former; only Cesium supports both simultaneously. Details can be see in the table at the 3D page in the OSM wiki.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

NilsBaumgartner1994 avatar May 07 '23 10:05 NilsBaumgartner1994

@waldyrious Streets GL has a free camera mode (Tab to toggle). I'm not sure if this is the kind of controls you are referring to though.

StrandedKitty avatar May 07 '23 10:05 StrandedKitty

And I think that the most complex part of the feature would be implementing physics. Of course it's possible to create an MVP without collisions with buildings and realistic vehicle handling. But physics is still an essential part, without it this feature would feel unfinished.

StrandedKitty avatar May 07 '23 10:05 StrandedKitty

Streets GL has a free camera mode (Tab to toggle)

Oh, that's cool, I hadn't noticed it! Yeah, that's the kind of movement I was talking about, but it would be nice to have more control over it (click+drag rather than just moving the cursor), especially since the cursor disappears in that mode.

I also seem to be bumping into weird interactions when trying to toggle it on and off. Firefox tells me I should press Esc to leave that cursor-capturing mode, but after I do that, trying to drag the map re-enters the mode without pressing Tab. And pressing Tab again zooms the view way out. But those should probably be reported as separate issues, unless you plan to use this mode for the feature requested here.

waldyrious avatar May 07 '23 10:05 waldyrious

No need for big physics. A small plane model where the camera Sitz behind/insideWithout collision Beste Grüße,Nils BaumgartnerAm 07.05.2023 um 12:42 schrieb Waldir Pimenta @.***>:

Streets GL has a free camera mode (Tab to toggle)

Oh, that's cool, I hadn't noticed it! Yeah, that's the kind of movement I was talking about, but it would be nice to have more control over it (click+drag rather than just moving the cursor), especially since the cursor disappears in that mode. I also seem to be bumping into weird interactions when trying to toggle it on and off. Firefox tells me I should press Esc to leave that cursor-capturing mode, but after I do that, trying to drag the map re-enters the mode without pressing Tab. And pressing Tab again zooms the view way out. But those should probably be reported as separate issues, unless you plan to use this mode for the feature requested here.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

NilsBaumgartner1994 avatar May 07 '23 11:05 NilsBaumgartner1994

For car view it would reveal many issues less visible now, such as bridges being flattened and different priorities (level of detail of buildings)

matkoniecz avatar May 08 '23 17:05 matkoniecz

Yeah please forget about the car :DJust a small plane. Looks way better Beste Grüße,Nils BaumgartnerAm 08.05.2023 um 19:12 schrieb Mateusz Konieczny @.***>: For car view it would reveal many issues less visible now, such as bridges being flattened and different priorities (level of detail of buildings)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

NilsBaumgartner1994 avatar May 08 '23 17:05 NilsBaumgartner1994

I also just discovered the "drive"/vehicle mode. A bit too fast imho, could use ctrl to crawl, or shift to run, though :-) Thanks so much, I really enjoy "driving home" through the hills, recognizing houses with missing colours, i.e. tagging work to do :-)

kayD avatar Jun 06 '23 19:06 kayD

I also just discovered the "drive" mode. A bit too fast imho, could use ctrl to crawl, or shift to run, though :-)

Thanks so much, I really enjoy "driving home" through the hills, recognizing houses with missing colours, i.e. tagging work to do :-)

How to enable it?

NilsBaumgartner1994 avatar Jun 06 '23 19:06 NilsBaumgartner1994

Just with TAB -- if you keep looking downwards a bit while moving, movement keeps sticking on the ground, and you appear to drive. Offroad, that is :smile: Seriously, it is more like walking in Counterstrike, with strafing on A and D and looking+steering with mouse, but it is great! Two things I noticed additionally:

  • Shift does in fact even speed up
  • when I try to slow down using Ctrl while going forward with W, the window closes :monocle_face: of course. Can the browser standard keys be "caught" as well? (Slowing down with Crtl seems unimplemented, as tested with other movement keys.)
  • 1/4 speed as the base speed would work better (at least for me)

kayD avatar Jun 06 '23 19:06 kayD