Camera bouncing on Scrolling map transition with game:on_map_changed()
In order to achieve a HUD at the top of the screen, above the camera, I used camera:set_size(320, 200)
and then camera:set_position_on_screen(0, 40)
. This is stored in a function (set_camera()) and called like this: game_meta:register_event("on_map_changed", set_camera())
.
Setting up a teletransporter to allow traversal between maps works on the 'immediate' and 'fade-in/fade-out' transition styles but when using the 'scrolling' transition style, the camera bounces up and down every time the map changes. This is detailed in this link (https://www.youtube.com/watch?v=qXnL8aQhP0A&feature=youtu.be) provided by the original person to discover this error.