but my Chracter turns 90 degrees from up to right or left. in its blue print version when i press both up and left together the character turns 45 degrees . how can I fix it like its blue print version ?
The Forward and Up are both executing the same code in the Twin Stick Shooter tutorial:
In that code the Direction vector has both the Up and Right values in X and Y. But yours only has X or Y. So to make it act similarly you could save the LookUp and LookRight values in class member variables. And call a common code base for both.
That method would match the blueprint. Personally I would implement it a different way. Every tick on the controller I would get the values, instead of responding to the event:
float up = InputComponent->GetAxisValue("LookUp");
float right = InputComponent->GetAxisValue("LookRight");
if (up + right != 0.0f) {
FVector Direction(up, right, 0);
FRotator Rotation = Direction.Rotation();
SetControlRotation(Rotation(Rotation);
}