I have made this system that allows me to rotate an object by clicking, and dragging the mouse, however this works for both mouse buttons.
What I would like to accomplish is having this only run when the right mouse button is down, and not when the left one is as I want the left mouse button to do something else.
I’ve tried many things but can’t seem to figure it out.
The screenshot you’ve provided doesn’t show which inputs trigger that variable named “drag” of yours, so we can’t tell what should be fixed in your code. Aren’t you using input actions though? You can just create a new input action and bind it to the right mouse button.
You can place an input event for the desired mouse button in your BP, you can either assemble the functionality there or call another event and place it on the execution chain. Based off your screenshot, your probably wanting to place a “mouse left” event, and have it change the value of the drag boolean. Hard to say tho without some further explanation on what your trying to do exactly
The “Drag” boolean doesnt have anything to do with mouse input its just called that by coincidence. It is set by interacting with a pillar that the rotated object is placed on, it could be called anything.
Also Im pretty sure I dont have any actual mouse events, just ShowMouseCursor and the stuff in the screenshots that has to do with my mouse.
I see. Then you’ll need to add an input action that’s binded to the right mouse button, and use that to achieve your goal. Here’s a tutorial on input actions:
To add mouse events right click in BP, type “mouse” or go to input then mouse, and select the button
or movement axis you’d like to bind functionality to, it will place a mouse button or movement event in your BP