X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fui%2Fui.cpp;h=43cdb53613ec2660603204128f9fffc91cf24839;hb=57d3e33b47c92d56de4007e23800d9bcdb353463;hp=6a48874116dea291e82dc22b0d8097a3df3c0fa8;hpb=07b8335e7bfd631e0878e183c87238812d632c56;p=blank.git diff --git a/src/ui/ui.cpp b/src/ui/ui.cpp index 6a48874..43cdb53 100644 --- a/src/ui/ui.cpp +++ b/src/ui/ui.cpp @@ -83,10 +83,11 @@ void PlayerController::Invalidate() noexcept { } void PlayerController::UpdatePlayer() noexcept { - constexpr float max_vel = 0.005f; + constexpr float max_vel = 5.0f; // in m/s if (dirty) { - player.GetEntity().Orientation(glm::quat(glm::vec3(pitch, yaw, 0.0f))); - player.GetEntity().Velocity(glm::rotateY(move_dir * max_vel, yaw)); + 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(); if (!world.Intersection(aim, glm::mat4(1.0f), player.GetEntity().ChunkCoords(), aim_world)) {