X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fui%2Fui.cpp;h=43cdb53613ec2660603204128f9fffc91cf24839;hb=b9a63fedbc65e8659c43f7fa381017c0c70a48da;hp=5b0eec8b1dac47bb7b1798e51dbfb4d814892893;hpb=4da2ae6f12d7cf4594edb2d560c5c112e9bcd094;p=blank.git diff --git a/src/ui/ui.cpp b/src/ui/ui.cpp index 5b0eec8..43cdb53 100644 --- a/src/ui/ui.cpp +++ b/src/ui/ui.cpp @@ -85,7 +85,8 @@ void PlayerController::Invalidate() noexcept { void PlayerController::UpdatePlayer() noexcept { constexpr float max_vel = 5.0f; // in m/s if (dirty) { - player.GetEntity().Orientation(glm::quat(glm::vec3(pitch, yaw, 0.0f))); + player.GetEntity().Orientation(glm::quat(glm::vec3(0.0f, yaw, 0.0f))); + player.GetEntity().GetModel().EyesState().orientation = glm::quat(glm::vec3(pitch, 0.0f, 0.0f)); player.GetEntity().TargetVelocity(glm::rotateY(move_dir * max_vel, yaw)); Ray aim = player.Aim();