1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-25 20:02:40 +01:00

Fixed camera to take Y mouse movement into account.

TODO: Make camera not intersect world geometry and other objects.
This commit is contained in:
Timmy Sjöstedt 2015-03-30 01:47:10 +02:00 committed by Daniel Evans
parent 4af866c92e
commit 59f7ca8b35

View File

@ -124,6 +124,7 @@ void IngameState::tick(float dt)
_lookAngles.y = -qpi; _lookAngles.y = -qpi;
auto angle = glm::angleAxis(-_lookAngles.x, glm::vec3(0.f, 0.f, 1.f)); auto angle = glm::angleAxis(-_lookAngles.x, glm::vec3(0.f, 0.f, 1.f));
angle *= glm::angleAxis(_lookAngles.y, glm::vec3(0.f, 1.f, 0.f));
player->updateMovementDirection(angle * _movement, _movement); player->updateMovementDirection(angle * _movement, _movement);