Skip to content

Commit

Permalink
Merge pull request #122 from caiiiycuk/html5
Browse files Browse the repository at this point in the history
Keep distance same on all aspect ratios
  • Loading branch information
IonAgorria authored Feb 19, 2024
2 parents 5343bd2 + d4fb41b commit 42f884a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Game/CameraManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ void terCameraType::setFocus(float focus)
void terCameraType::update()
{
Vect3f position;
position.setSpherical(coordinate().psi(), coordinate().theta(), coordinate().distance());
auto aspectScale = ((float) terScreenSizeX) / terScreenSizeY / (4.0f / 3);
position.setSpherical(coordinate().psi(), coordinate().theta(), coordinate().distance() * aspectScale);
position += coordinate().position();
if(oscillatingTimer_()){
float t = (float)(explodingDuration_ - oscillatingTimer_())/1000;
Expand Down

0 comments on commit 42f884a

Please sign in to comment.