[1.1.91] zoom_to_world makes camera stop following player during replays
Posted: Sun Oct 22, 2023 3:14 am
If you are recording a replay and a script calls LuaPlayer.zoom_to_world to switch the player rendering mode to the "zoomed in map" mode at a given point..
Then when replaying the replay, this zoom-to-world takes effect during the replay and never reverts to the regular camera which follows the player.
Since replays don't otherwise appear to track/replay map view changes, and there's no way to change the map view interactively when watching a replay, this means that during the replay you're stuck with the camera pointing at the zoomed location while the player runs around elsewhere, out of view.
To reproduce, I started a new game with the FactorySearch 1.10.14 mod (only) enabled, and did a couple of searches for starting items (ammo in the crashed ship, wood in a wood chest). Factory Search will call zoom_to_world when you select a result, to take you to the found location.
Replay the save, and you'll see the camera detach at the point where a search result is viewed.
edit: attachments don't want to cooperate, so here's dropbox links for the save/logfile:
https://www.dropbox.com/scl/fi/x3ihz9ne ... 0xc73&dl=0
https://www.dropbox.com/scl/fi/xrwck29x ... qr7fi&dl=0
Then when replaying the replay, this zoom-to-world takes effect during the replay and never reverts to the regular camera which follows the player.
Since replays don't otherwise appear to track/replay map view changes, and there's no way to change the map view interactively when watching a replay, this means that during the replay you're stuck with the camera pointing at the zoomed location while the player runs around elsewhere, out of view.
To reproduce, I started a new game with the FactorySearch 1.10.14 mod (only) enabled, and did a couple of searches for starting items (ammo in the crashed ship, wood in a wood chest). Factory Search will call zoom_to_world when you select a result, to take you to the found location.
Replay the save, and you'll see the camera detach at the point where a search result is viewed.
edit: attachments don't want to cooperate, so here's dropbox links for the save/logfile:
https://www.dropbox.com/scl/fi/x3ihz9ne ... 0xc73&dl=0
https://www.dropbox.com/scl/fi/xrwck29x ... qr7fi&dl=0