Is it possible to set the left mouse button to click and move location on the scenery, and use the mouse right to just turn the camera 360 degrees(rotation)?

Good afternoon friends, I am currently developing a project in Unreal where my client will view the product in the first person view, my question is the following, it is possible to set the left mouse button to click and move location on the scenery, and use the mouse right to just turn the camera 360 degrees(rotation)? I tried the top down mode but I can not set the right mouse to look around! Thank you

Are we talking C++ or blueprints?

I’m talking about blueprints, the intention is to use only the left mouse button to click and move me on the stage and use the mouse to rotate to view the product while I’m on the stage!
Top Down mode only allows me to click on the left mouse button and move but does not allow rotation with the mouse to observe the whole scene.

This answer is only in regard to the rotation of the camera, not the left-mouse movement

Talking blueprints, you can create an input action for panning (this is where you’d create your mapping to right mouse button). Refer to the image below.

257517-pan-mapping.png

NOTE: You can set the input actions by pressing EditProject settings. In the window, press Input on the left pane. Add the action mapping by pressing the + (I don’t know how much you know about UE4).

With this action mapping, you can listen on the click event. From here you can use the Mouse X and Mouse Y events, to get the axis value.

257518-mouse-events.png

With the values from these two events, you can define how much you want to move the camera. First, you need to get a reference to the player camera pawn. With this reference you can get the actor rotation, break the rotator, and change the yaw of the rotator. With this new rotator, you can simply just set the actor rotation of the player camera pawn. They say that images say more than word, so refer to this image.

Reference to player pawn

Change yaw on the rotator of the player pawn

This is only for the yaw, but it should be fairly simple to convert this to either the roll, or the pitch if you want that as well.

NOTE: You can easily change the pan sensitivty by adding a multiplier to the axis value. Simply multiply it before change the rotator, just like the image below.

This will work, however this seems to be implemented in the level BP. You could also use a character class BP to do something similar in the character BP itself, which would remove the need to get and cast the camera pawn. In this specific case, it’s probably not super important which you choose though.

Thanks guys for the help, though I did some research and I was able to find a video where it is explained in top down mode, how to use a mouse button to look around and keep the left mouse just to click and move.
So after this tutorial i was able to use in 1st Person mode the left mouse to move around (click to move) and right mouse to look around when pressed.
I leave the link here

Cheers

This is the player controller, but yes. Controller/character, not super important :slight_smile: