The input from Mouse Wheel Up/Down doesn’t seem to work at all in my PlayerController class.
I made it so it constantly prints its value , and the Mouse Wheel Up/Down it’s the only case which the input is not received.
I tried to
-Change the input to keyboard and it worked
-Change the input to left/right mouse click and it worked
-Have an Action Mapping that print a string everytime the Mouse Wheel is scrolled and it worked
-My Mouse’s wheel is not broken
here is the code with the different functions
ARTSPlayerController::ARTSPlayerController()
{
bEnableClickEvents = true;
bShowMouseCursor = true;
bEnableTouchEvents = true;
}
void ARTSPlayerController::SetupInputComponent() {
Super::SetupInputComponent();
this->InputComponent->BindAction("Move", IE_Pressed,this, &ARTSPlayerController::Move);
this->InputComponent->BindAxis("Wheel", this, &ARTSPlayerController::Wheel);
}
void ARTSPlayerController::Move() {
if (GEngine) {
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("found"));
}
}
void ARTSPlayerController::Wheel(float Value) {
if (GEngine) {
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, FString::Printf(TEXT("value: %f"),Value));
}
}
And it just prints 0.00000 even when i scroll up or down w