diff --git a/Crawler/Crawler.cpp b/Crawler/Crawler.cpp index a1ed3e72..c7cffd0d 100644 --- a/Crawler/Crawler.cpp +++ b/Crawler/Crawler.cpp @@ -388,13 +388,12 @@ void Crawler::HandleUserInput(float fElapsedTime){ void Crawler::UpdateCamera(float fElapsedTime){ lastWorldShakeAdjust=std::max(0.f,lastWorldShakeAdjust-fElapsedTime); if(worldShakeTime-fElapsedTime>0){ - worldShakeVel={1000,-1000}; if(lastWorldShakeAdjust==0){ - lastWorldShakeAdjust=0.04; + lastWorldShakeAdjust=0.02; worldShakeVel.x*=-1; worldShakeVel.y*=-1; } - worldShake=player->GetPos()+worldShakeVel*fElapsedTime; + worldShake=player->GetPos()+worldShakeVel; }else{ camera.SetTarget(player->GetPos()); } @@ -1147,7 +1146,7 @@ vf2d Crawler::GetWorldMousePos(){ } void Crawler::SetupWorldShake(float duration){ - worldShakeVel={750,-750}; + worldShakeVel={13,-13}; worldShakeTime=duration; worldShake=vf2d{player->GetPos()}; camera.SetTarget(worldShake); @@ -1580,6 +1579,7 @@ int main() std::cout<