Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. void AEstPlayer::Tick(float DeltaSeconds)
  2. {
  3. Super::Tick(DeltaSeconds);
  4.  
  5. UpdateCamera(DeltaSeconds);
  6. }
  7.  
  8. void AEstPlayer::UpdateCamera(float DeltaSeconds)
  9. {
  10. FVector EyeLocation;
  11. FRotator EyeRotation;
  12. GetActorEyesViewPoint(EyeLocation, EyeRotation);
  13.  
  14. auto Interp = FMath::VInterpTo(Camera->RelativeLocation, EyeLocation, DeltaSeconds, 24.f);
  15.  
  16. Camera->SetRelativeLocation(Interp);
  17. Camera->SetRelativeRotation(EyeRotation);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement