I have a C++ project that I’ve been working on for a while now, but the time has come to get the proper user controls going. Before I write any code in C++, I want to pre-build them in Blueprints to make sure they do what I want.
The goal is to have World of Warcraft style controls, where you hold down the Right Mouse Button to enable mouselook, and to interact with items, with Left Mouse Button used for clicking the hotbar, and selecting other characters and objects.
My first step, getting Mouselook to enable on RMB, works. The problem I’m running into right now is that when I use the RMB, the camera seems to lock into a 180 degree swing. I can rotate halfway around the model, then it stops, and rotate back 180 degrees. (If I continue swinging back and forth, it will eventually change the start & end positions.) If I release the RMB and click it again, I can continue to rotate around, with that as the new starting point.
Now here’s the kicker: If, while RMB is pressed, I click the Left mouse button, then the camera-look works exactly the way I want, able to swing completely around the model as much as I want, until I release the RMB. Then, the problem shows up again.
There is nothing attached to the controls in the C++ code, other than the default Turn/LookUp functions that come with ACharacter. In Blueprints, the only things connected to LMB is a function to print if the button is pressed or not. RMB has the same print function, but includes Set Ignore Look Input, Is in Input Mode, Show Mouse, Enable Click Eventgs, and Enable Mouse Over Events, ticked or not depending on if the button is pressed or not.
I have no clue as to why the camera/boom is being limited in this way, or why pressing LMB fixes it. Of note: switching the LMB/RMB functions in Blueprints does not affect the issue, other than switching which buttons I have to press.
For the Visual people, Here are my blueprints: