Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. if (ForceTaken > 0)
  2.     {
  3.         const float Alpha = ForceRecoveryTime == 0.f ? 1.f : FMath::Clamp(RecoveryTimer / ForceRecoveryTime, 0.f, 1.f);
  4.         if (RecoveryTimer < ForceRecoveryTime)
  5.         {
  6.             RecoveryTimer += DeltaTime;
  7.         }
  8.         ForceTaken = FMath::Lerp(ForceTaken, 0.f, Alpha);
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement