Hello,
I have created a character for my game, and a custom player controller to hold all my key bindings and functions to move the player. But I don't know how to call the character's AddMovementInput method in my Player Controller class. Do you know how to do it?
I have created a character for my game, and a custom player controller to hold all my key bindings and functions to move the player. But I don't know how to call the character's AddMovementInput method in my Player Controller class. Do you know how to do it?
Code:
void ABZPlayerController::MoveForward(float Value) { if ((this != NULL) && (Value != 0.0f)) { //Find out which way is forward FRotator Rotation = this->GetControlRotation(); //Add movement to that direction const FVector Direction = FRotationMatrix(Rotation).GetScaledAxis(EAxis::X); ABZCharacter->AddMovementInput(Direction, Value); //HOW TO CALL THIS } }
Comment