StrandedKitty / streets-gl

🗺 OpenStreetMap 3D renderer powered by WebGL2
http://streets.gl
MIT License
660 stars 49 forks source link

Feature Request - Camera Movement: Vehicle Mode #64

Open NilsBaumgartner1994 opened 1 year ago

NilsBaumgartner1994 commented 1 year ago

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 commented 1 year ago

Or "fly" with a small plane around

waldyrious commented 1 year ago

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.

NilsBaumgartner1994 commented 1 year ago

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: @.***>

StrandedKitty commented 1 year ago

@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 commented 1 year ago

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.

waldyrious commented 1 year ago

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.

NilsBaumgartner1994 commented 1 year ago

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: @.***>

matkoniecz commented 1 year ago

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

NilsBaumgartner1994 commented 1 year ago

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: @.***>

kayD commented 1 year ago

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 :-)

NilsBaumgartner1994 commented 1 year ago

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?

kayD commented 1 year ago

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: