Need some help with my top down camera.

Hey, i’m having some issues with my top down camera for the top down game i’m working on. The camera for the game is in it’s own class that the player spawns, the player then calls a function in the camera class which moves the camera to a location above the player. The problem that i’m having is with the rotation of the camera, currently i have so that the player is always looking at the mouse in the game but this seem to cause my camera to totally flip out and spin very quickly.

If i set the pitch to always be -90 it works just fine with the player rotation and all. But when i implement the other rotations too it start spinning. (I need to have the other values besides pitch because the player will be able to tilt and wont be standing in that direction all the time.)

// Get vector location from player, players up vector + distance
FVector StartFVector = PlayerLocation;
FVector EndFVector = StartFVector + (PlayerUpVector * DistanceFromPlayer);
SetActorLocation(EndFVector);

// Direction the camera needs to look in
FVector CameraLocation = GetActorLocation();
FVector LookAtDirection = PlayerLocation - CameraLocation;
LookAtDirection.Normalize();

SetActorRotation(FRotator(LookAtDirection.Rotation().Pitch, LookAtDirection.Rotation().Yaw, LookAtDirection.Rotation().Roll));

I’m not really sure what is causing it to spin rapidly around when the player moves the mouse, i checked around a bit and found that the cameras position in the X and Y axis were moving very slight roughly 1 unit in either direction when the player was standing normally and moving the mouse around could this be the cause?