My move camera function triggers every frame

I have a simple input bind:

PlayerInputComponent->BindAxis("RollCamera", this, &ABaseCharacter::MoveAwayCamera);

But function MoveAwayCamera triggers every frame and not only when I roll the mouse wheel.

Is it “ok” behavior? I’m not sure if this function must be called if I’m not touching the wheel.

Axis input events broadcast the current value of the input each frame, even if it’s 0.
If you don’t want it to trigger when the value is below a certain threshold you’ll need to add a check.

If it’s not a problem for your game, it’s not a problem.

Axis input events broadcast the current value of the input each frame, even if it’s 0. If you don’t want it to trigger when the value is below a certain threshold you’ll need to add a check.

If it’s not a problem for your game, it’s not a problem.