X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2Fstates.cpp;h=e45356b5a29f6779a878ca07a6d4c490d44c591f;hb=475f28f06c9e14912bab8119264e247ef466513d;hp=ecba340312dd84a6fbca76c791c8cd7531c575e2;hpb=b9af958c3f80a966bd31c622a45d0f3375bf2c3a;p=blobs.git diff --git a/src/app/states.cpp b/src/app/states.cpp index ecba340..e45356b 100644 --- a/src/app/states.cpp +++ b/src/app/states.cpp @@ -21,7 +21,7 @@ MasterState::MasterState(Assets &assets, world::Simulation &sim) noexcept , cam(sim.Root()) , cam_dist(5.0) , cam_tgt_dist(5.0) -, cam_orient(PI * 0.125, 0.0, 0.0) +, cam_orient(PI * 0.375, PI * 0.25, 0.0) , cam_dragging(false) , cp(assets) , remain(0) @@ -110,7 +110,7 @@ void MasterState::OnMouseWheel(const SDL_MouseWheelEvent &e) { constexpr double zoom_scale = -1.0; constexpr double zoom_base = 1.125; cam_orient.z = glm::clamp(cam_orient.z + double(e.x) * roll_scale, PI * -0.5, PI * 0.5); - cam_tgt_dist = std::max(1.0, cam_tgt_dist * std::pow(zoom_base, double(e.y) * zoom_scale)); + cam_tgt_dist = std::max(cp.GetCreature().Size() * 2.0, cam_tgt_dist * std::pow(zoom_base, double(e.y) * zoom_scale)); } void MasterState::OnRender(graphics::Viewport &viewport) {