diff --git a/src/sim/simulation/sim.py b/src/sim/simulation/sim.py index c92faa6..2b034cd 100644 --- a/src/sim/simulation/sim.py +++ b/src/sim/simulation/sim.py @@ -15,8 +15,8 @@ from src.sim.input.input import Input from src.sim.output.output import Output -SCREEN_WIDTH = 1000 -SCREEN_HEIGHT = 1000 +SCREEN_WIDTH = 800 +SCREEN_HEIGHT = 800 SCREEN_TITLE = "ARORA" if TYPE_CHECKING: @@ -299,12 +299,11 @@ def update_viewport_position(self) -> None: Updates the position of the viewport. """ self.set_viewport( - 0, - SCREEN_WIDTH, - self.root_tip_y - 2, - SCREEN_HEIGHT + self.root_tip_y - 2, + self.root_midpointx - SCREEN_WIDTH / 2, + self.root_midpointx + SCREEN_WIDTH / 2, + self.root_tip_y - SCREEN_HEIGHT / 8, + self.root_tip_y - SCREEN_HEIGHT / 3 + SCREEN_HEIGHT, ) - self.window_offset = self.root_tip_y - 2 def on_update(self, delta_time: float) -> None: """ @@ -373,6 +372,7 @@ def main( geometry, ) print("Running Simulation") + simulation.update_viewport_position() simulation.run_sim() return simulation.get_tick()