Hi, I’m pretty new to UE4, and currently working on a third person shooter game.
I was wondering how I might use right-click to move the camera to the side of the actor, and take input from the left mouse button only when the right mouse button is being held. Can anyone help with this? Thanks!
Your question is covered by many tutorials out there, I’ll cover the very basic stuff to give you a way-to-go.
On Edit → Project Settings → Input.
Add two action Mappings for Left and Right Mouse clicks, we need this to know when the player presses the those buttons.
On your character blueprint, use the pressed input event for the right mouse to move the camera and set a boolean variable like ‘IsHoldingRightMouseButton’ to true.
Use the released event from the right mouse to move back the camera and clear the boolean variable.
When the left mouse is pressed, check if the boolean variable is true.