I’m trying to rotate an actor using the mouse X axis, but only while the right mouse button is held down. I know I can do this using two separate input actions. One for the right mouse button and one for the mouse X axis, which is what I was doing in the old input system. However, I’m wondering if there is a better way using the new Enhanced Input system? i.e. can I create just one input action to read the mouse X axis, but have it only trigger when a given key (such as the right mouse button) is held down?
You still need two Actions for this … at least how far i know. But you can use a trigger to simplify your code. If you have one IA_ActivateRotation and one IA_Rotate then you can use a chorded Action trigger on IA_Rotate. Bind Mouse button to IA_ActivateRotation and movement to IA_Rotate in the mapping context and you only need to bind to the IA_Rotate Action in your code.
1 Like
A chorded actions is what I was looking for. Thank you.