I had this working in 4.13.2. Being able to left click on actors and then hold the right button down to look around and being able to right click on actors.
I had a timer on my right moust button (RMB) click for .2 seconds that set a bool for the RMB being held. Then in my custom player controller I overrode the AddPitchInput and AddYawInput.
First question, is there a way to make this work? What I have read over the past versions is NOT encouraging. Looks like Epic says “Move the mouse aims, left button is for firing, right click hold is for zooming in”.
I stripped everything down where I am logging the up and down for both buttons. As soon as a I left click, the cursor jumps out of the game, as if I had pressed SHIFT-F1. My Project settings under Input, Viewport properties are set for Capture Mouse on Launch, Capture Permanently Including Initial Mouse Down and Lock on Capture.
I am in the process attempting to set the viewport directly when beginPlay on the character, but I am not sure that is the right path.
*I am building against source if that makes any difference
I have determined that multiple settimer and clearing the timer is not responsive enough for tracking the RMB hold. It’s funny, I want similar functionality in my game as I get in the Editor. Right click and hold to move the camera, quick right click to do another action like pull up a menu.
So far my research on this makes me conclude that the Unreal Engine 4 expect the mouse only be used for interacting with the UI widgets. Use a targeting reticle for selecting actors and then a key (like “E”) to pickup, open, etc.
If I don’t have the following code in my C++ player controller, my mouse clicks are responsive. I was running this code in my Yaw input method which means it was getting called ALOT.
Now I have the issue of the “look” stopping when the cursor gets to the edge of the screen which was what the above code was supposed fix. Thank you to Panda Studios with their Character Stats kit to show me that what I am trying to do is not that far off base.
This totally breaks when I run in Standalone. I get the cursor off in the upper left of my screen and every time I move it towards the game window, it flickers back. Totally unusable. I have three monitors off my computer. Wonder if this affecting it.