Skip to content

Commit

Permalink
Add small offset to window camera in order to prevent glitches
Browse files Browse the repository at this point in the history
  • Loading branch information
aBlueShadow authored Nov 2, 2024
1 parent 74dd574 commit 7306c9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/screens/windowScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void WindowScreen::update(float delta)

auto position = my_spaceship->getPosition() + rotateVec2(glm::vec2(my_spaceship->getRadius(), 0), camera_yaw);

camera_position.x = position.x;
camera_position.x = position.x + 1.0f; // small offset to prevent camera glitches on some models
camera_position.y = position.y;
camera_position.z = 0.0;
}
Expand Down

0 comments on commit 7306c9a

Please sign in to comment.