Skip to content

Camera follows and zooms in on player

Alessandro Vinciguerra requested to merge drag_cam into master

The user can now set the camera to follow the player and zoom in. The map no longer has to be scaled to fit in the window.

Known issue: dragging the egui windows still registers as a drag event and pans the game camera as well. This should not happen. Solved in 0a082e8e.

Second issue: the camera is jumpy when following the player, probably because the player movement and camera movement aren't happening in the same Bevy system and thus not always in the same frame. Solved in 39f4b933.

Possible additions:

  • A setting to change the automatic zoom level in case a user has a bigger display and wants a lower default zoom level. For this to be useful, the in-game control panel should also indicate the current zoom level.
  • Tweaking default map parameters now that window size isn't an issue.

Closes #8 (closed).

Also closes #4 (closed) because tile scaling is now unneeded.

Edited by Alessandro Vinciguerra

Merge request reports

Loading