Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void AEstPlayer::Tick(float DeltaSeconds)
- {
- Super::Tick(DeltaSeconds);
- UpdateCamera(DeltaSeconds);
- }
- void AEstPlayer::UpdateCamera(float DeltaSeconds)
- {
- FVector EyeLocation;
- FRotator EyeRotation;
- GetActorEyesViewPoint(EyeLocation, EyeRotation);
- auto Interp = FMath::VInterpTo(Camera->RelativeLocation, EyeLocation, DeltaSeconds, 24.f);
- Camera->SetRelativeLocation(Interp);
- Camera->SetRelativeRotation(EyeRotation);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement