Move and Look work, Jump and StopJumping do not. Code compiles without errors.
Copy/Pasted from TP_ThirdPersonCharacter, but this is being setup in a controller instead of a character.
// Jumping, does not work
EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Started, this->GetCharacter(), &ACharacter::Jump);
EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Completed, this->GetCharacter(), &ACharacter::StopJumping);
// Moving, works
EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &APlayerCharacterController::Move);
// Looking, works
EnhancedInputComponent->BindAction(LookAction, ETriggerEvent::Triggered, this, &APlayerCharacterController::Look);
That’s essentially what I ended up doing with GetCharacter(), but I was hoping to try to do it by calling the Character class directly without the extra functions. Got similar advice on Discord so this is probably the right way to go.
This is what I ended up with. Thanks for the right direction!