OSMeta icon indicating copy to clipboard operation
OSMeta copied to clipboard

Store and Restore the actual camera view

Open DerKarlos opened this issue 2 years ago • 3 comments

This is mostly about the "class" GeoView https://github.com/DerKarlos/OSMeta/blob/70e754bbd19425904374b21dae814fe124b8cb43/src/cam_map/geoview.rs

Add an option to store and restore the actual view of the camera/user The position should be in lat/lon to make it usable for different tileMaps We also need the height of the view spot, the distance, alpha and beta rotation of the orbit camera and additional values like the zoom / camera.FoW

A "GeoView" is stored and found by a name string It gets stored in data memory and in a file or browser cookies. May be there is a Bevy function for this.

At programm start the GeoView automatically is saved under "start" If a View is restored, the actual View is saved under "back"

In the main code/control number-keys are used: 0: restore "start" 1-9: store "keyN" Shift: 0: restore "start" Shift: 1-9: restore "keyN" backspace: restore "back"

DerKarlos avatar Nov 28 '23 10:11 DerKarlos

https://github.com/hankjordan/bevy_save looks promising as a framework for handling this correctly on all platforms

oli-obk avatar Nov 28 '23 12:11 oli-obk

Your struct Args is the same as my GeoView. The app resource is GeoView tag "start". I will make a map of Args and may be add the old fn to the struct (class). And make the map as the app resource. As it is rather a camera/player position&view details, would you mind if I rename it to GeoView?

DerKarlos avatar Dec 10 '23 07:12 DerKarlos

well, the Args struct contains other settings, too. like "xr". You could add a geo_view field to the struct and use that for the fields that are geo-view specific

oli-obk avatar Dec 10 '23 11:12 oli-obk