Handlin Multiple Input Conditions

Hi,

Short explanation of my setup:
I got a base actor which has several components derived from staticMeshComponents attached, as well as an inputComponent.
Each of the staticMeshComponents in turn has between 1 and 4 components of that type attached to it.

Now my problem:
I want each of the meshComponents to light up their color on mouse over or when it is clicked.
If it is selected via click or onMouseOver and I scroll I want to scale it.
If it is selected via click or onMouseOver and I press ctrl and then scroll I want to just scale it in x and y.

Now, I can handle all the scaling and color changes, my problem is just with the different layers of input requirements put on top of each other.
One idea was to make bools like isHover, isSelected and isControlPressed and add corresponding events that set them.
This would leave me qith the question: Is there an event for mouseScroll?

Or a more complicated question: Is there a better way to handle this?
In Unity I would handle it something like for the distortion in x and y;

if(Input.GetKey(“ctrl”))

{
if(Input.GetAxis(“Mouse ScrollWheel”) != 0f )

{

distortion.X += 1 * Input.GetAxis(“Mouse ScrollWheel”);

distortion.Y += 1 * Input.GetAxis(“Mouse ScrollWheel”);

}
}

My problem is I do not really know how to do something like this in Unreal. So far I only found out that you can’t map the scroll wheel to an axis.

Thanks for your help.

In UE4, you have two types of inputs, Action Mapping (that map a controller key to a user defined input key like “Attack” or “Jump”) and Axis Mappings that map controller’s axis (keyboard/mouse/gamepad). Mouse wheel is an axis mapping

Open your project in the ue4 editor, go to Edit > Project Settings > Input (under Engine category) > Axis Mapping

Give a name to your axis mapping like “Zoom” and assign an axis controller key (like Mouse Wheel Axis)

In C++, you can then hook up the “Zoom” input key to a function

In your Character (or Pawn) class, override the SetupPlayerInputComponent function

header

virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;
void HandleInputZoom(float Val);

source

void AMyCharacter::SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent)
{
	// set up gameplay key bindings
	PlayerInputComponent->BindAxis("Zoom", this, &AMyCharacter::HandleInputZoom);
}

The C++ templates (fps, tps, side scroller templates) have examples of this for movement