1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 02:12:45 +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
parent 4b915d5271
commit 7729ae171d

View File

@ -142,6 +142,7 @@ void IngameState::tick(float dt)
_lookAngles.y = -qpi;
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);