From aaf94c7d578070c72dbbae365fdf7352edef94ef Mon Sep 17 00:00:00 2001 From: baz Date: Thu, 6 Jun 2024 00:22:02 +0100 Subject: [PATCH] Fix LookAtRotationn --- Source/tank/SplineCameraVolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/tank/SplineCameraVolume.cpp b/Source/tank/SplineCameraVolume.cpp index 01ffa27..7c5975a 100644 --- a/Source/tank/SplineCameraVolume.cpp +++ b/Source/tank/SplineCameraVolume.cpp @@ -29,6 +29,6 @@ void ASplineCameraVolume::Tick(float DeltaSeconds) if (IsActive && LookAtPlayer && TankPlayerCharacter) { TankPlayerCharacter->CameraComponent->SetWorldRotation(UKismetMathLibrary::FindLookAtRotation( - TankPlayerCharacter->GetTransform().GetLocation(), TankPlayerCharacter->GetTransform().GetLocation())); + TankPlayerCharacter->CameraComponent->GetComponentToWorld().GetLocation(), TankPlayerCharacter->GetTransform().GetLocation())); } }