Hey Guys,
I was just playing around with the c++ third person template, when I noticed that the movespeed from the MoveForward function in the character class is directly depending on the camera angle. So when you move the camera as high as possible (i.e. when you look down on the body) you can’t move anymore.
I think that is, because the FVector Direction only uses Rotation, instead of YawRotation, and YawRotation remains unused.
void AUnreal_LifeCharacter::MoveForward(float Value)
{
if ((Controller != NULL) && (Value != 0.0f))
{
// find out which way is forward
const FRotator Rotation = Controller->GetControlRotation();
const FRotator YawRotation(0, Rotation.Yaw, 0);
// get forward vector
const FVector Direction = FRotationMatrix(Rotation).GetUnitAxis(EAxis::X);
AddMovementInput(Direction, Value);
}
}
My question is now: bug, or feature?
Greetings,
Tobi