From ee3fee8a4bf3e77b17c940fb8f3daf30ede46cce Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Fri, 13 Nov 2015 16:45:18 +0100 Subject: [PATCH] =?utf8?q?use=2060=C2=B0=20as=20max=20head=20yaw?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit this seems a little more natural min/max pitch still look weird, but might make players angry if it's less than 90° maybe head animation should use a fraction of read pitch --- src/world/world.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/world/world.cpp b/src/world/world.cpp index 4d01af3..dfcf721 100644 --- a/src/world/world.cpp +++ b/src/world/world.cpp @@ -220,8 +220,8 @@ void Entity::OrientBody(float dt) noexcept { } void Entity::OrientHead(float dt) noexcept { - // maximum yaw of head (90°) - constexpr float max_head_yaw = PI_0p5; + // maximum yaw of head (60°) + constexpr float max_head_yaw = PI / 3.0f; // use local Y as up const glm::vec3 up(model_transform[1]); // if yaw is bigger than max, rotate the body to accomodate -- 2.39.2