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