Rotating player by mouse

Hi guys
I was editing the top down template made in c++, to use wasd and the mouse.
Wasd movement works, but the player don’t totally rotate using the mouse, why?
What could it be?
Here is a gif about the problem:

Could be gimble lock. Look up the term. Basically its when the axis align you end up losing a degree of motion. Its just one of those things. Try to use a quaternion to do the rotation instead. This is just going to be a totally random snippet of code that happens to use a quaternion to perform a rotation because you didn’t post any of your code.

//Determine rotation amount
FVector DragStart = RightGripStickyLocation - PlanetCenterV;
FVector DragEnd = ImpactV - PlanetCenterV;
FVector RotationV = FVector::CrossProduct(DragStart, DragEnd).UpVector;
FQuat RotationQuat = FQuat::FindBetweenVectors(DragStart, DragEnd);
float RotationAngle = FVector::DotProduct(DragStart, DragEnd) * GetWorld()->DeltaTimeSeconds;
RotationQuat.ToAxisAndAngle(RotationV, RotationAngle);

//Apply the rotation
FTransform TargetTransform = ParentPlanet->GetTransform();
TargetTransform.SetRotation(RotationQuat);
TargetTransform.ConcatenateRotation(PlanetRotationAmount.Quaternion());
TargetTransform.NormalizeRotation();
ParentPlanet->SetActorTransform(TargetTransform);

Look at my character code if you want :slight_smile: Code