Download

Character Movement

Hey folks I have an odd problem. I haven’t touched my movement input in awhile (or since I wrote it) and it was working and now suddenly no matter what movement button I press the character moves backwards. So I cloned my project deleted the Character BP and redid it (the movement code is all in C++) and it seemed to fix all the problem except when I move right it moves at like a 45* degree angle to the right. It moves left just fine. Here is a sample of my movement code


void APlayerCharacter::MoveRight(float Value)
{
    if (Value != 0.F)
    {
        AddMovementInput(GetActorRightVector(), Value);
     }
}


The code above is correct so I’m kinda lost here. Check your Input settings, maybe you accidentally have the same key bound for different inputs. Also make sure that you are not binding the same function to different inputs in C++ (e.g. MoveForward bound to move right input).

So I checked and all my movement inputs are set correctly. This problem just started suddenly. I also ran a debug and the correct movement function is called when I press the movement keys so I’m at a total loss here. That’s why I posted here. I ran out of ideas