I need to branch based on if the RMB or LMB is clicked. What is the best way to do this in cpp. I have actions set up for rmb and lmb. One way I thought, would be to write 2 functions for each action that sets a private “is clicked” variable to true or false based on press or release. but that seems like a hassle. I notice that blueprint has a right mouse and left mouse pressed boolean, I was wondering if there is something similar in c++.
Thanks guys, let me know what the best way of handling this is.
If you only have a player controller, it’s a bit more tricky, but not too difficult. I shared my struggles with the issue at the end of this post (Player controller input handling - C++ Programming - Unreal Engine Forums). Read the Wiki article and then bind your delegates in the same manner after registering the input component.