Skip to content

Commit

Permalink
Client: Fix camera rotation when in a ship
Browse files Browse the repository at this point in the history
  • Loading branch information
SirLynix committed Dec 6, 2024
1 parent 1b543ad commit 2ea5ed0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Game/States/GameState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ namespace tsom

cameraNode.SetPosition(characterPos + characterRot * (Nz::Vector3f::Up() * Constants::PlayerCameraHeight));

Nz::Quaternionf cameraRotation = environmentNode->GetRotation() * m_referenceRotation * Nz::Quaternionf(predictedCameraRotation);
Nz::Quaternionf cameraRotation = environmentNode->GetGlobalRotation() * m_referenceRotation * Nz::Quaternionf(predictedCameraRotation);
cameraRotation.Normalize();

if (m_isPilotingShip)
Expand Down

0 comments on commit 2ea5ed0

Please sign in to comment.