Hi there, I’m using the new Enhanced Input Component and binding the inputs in c++.
I’ve got all of the movement and everything working but I’m confused as to how to get a “press and release” action to work.
When I press down the right mouse button, I want to zoom in, and when I release it I want to zoom back out. I can handle the actual zooming and everything but how would I go about setting up that sort of input.
Here’s a picture of what I have so far, am I on the right track?
and here’s the C++ code I’m using to bind the action:
if (ZoomAction)
{
PlayerEnhancedInputComponent->BindAction(ZoomAction, ETriggerEvent::Started, this, &APB_PlayerCharacterPrimary::ZoomCamera);
PlayerEnhancedInputComponent->BindAction(ZoomAction, ETriggerEvent::Completed, this, &APB_PlayerCharacterPrimary::ZoomCameraOut);
}
It seems that the ‘Released’ trigger I have set up in the editor fires ‘ETriggerEvent::Completed’ , is this the correct way of making this sort of input?
Thanks for any help!