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:
parent
4b915d5271
commit
7729ae171d
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user