fix: camera position (#74)

* fix: camera position

* Update lib/game/pinball_game.dart

Co-authored-by: Allison Ryan <77211884+allisonryan0002@users.noreply.github.com>

Co-authored-by: Allison Ryan <77211884+allisonryan0002@users.noreply.github.com>
pull/77/head
Erick 2 years ago committed by GitHub
parent 5f90e62258
commit c0f451b6f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -41,9 +41,9 @@ class PinballGame extends Forge2DGame
unawaited(_addPaths());
unawaited(addFromBlueprint(Spaceship()));
// Fix camera on the center of the board size
// Fix camera on the center of the board.
camera
..followVector2(screenToWorld(boardSize / 2))
..followVector2(Vector2.zero())
..zoom = size.y / 14;
}

Loading…
Cancel
Save