Jump to content

Switching mouse controls?


photo

Recommended Posts

Posted

Hi,

I am asking this for a friend, he uses his pc via a box, and as such, he requires the mouse controls to be switched. Is this possible with a option/preference?

If not, is there anyway I could manually add such a feature via C++ or script?

 

Cheers.

 

 

Posted

Sorry box is a special way to use a pc/os.

And yeah the above should work, thank you.

Posted

Hi. When I changed Forward to mouse left for the game mode, it doesn't work.. With my special software, I can't hold down WSDA. I am disabled and I use an on screen keyboard/mouse function with a switch that is under my foot... Also my wheelchair's control can control the pc's mouse, I use that for games and game development....... Anyway to make mouse left to walk forward

Thank you 

Posted
On 4/24/2020 at 11:28 PM, noah.gomes said:

Hi. When I changed Forward to mouse left for the game mode, it doesn't work.. With my special software, I can't hold down WSDA. I am disabled and I use an on screen keyboard/mouse function with a switch that is under my foot... Also my wheelchair's control can control the pc's mouse, I use that for games and game development....... Anyway to make mouse left to walk forward

Thank you 

Hello, I would like to clarify some behavior so that we do not have any future misunderstandings

If we talking about C++ project, there is Engine Viewport are also available and as well as compiled project its controls are management on the tab Settings > Controls from editor.
Scene Viewport hotkeys are located on different tab, you can find them on Settings > Editor > Hotkeys tab.

controls.png

Speaking of default C# project you can be tricked, because scene already contains player which is have controls based on C# Component inside of "FirstPersonController.cs" which is override Controls from Editor > Settings > Control tab.

So, if you want to have move forward followed by mouse left button on default player in game mode, you need to edit 713 line at at "FirstPersonController.cs"
change from

if (Input.IsKeyPressed(forwardKey) 

to

if (Input.IsKeyPressed(forwardKey) || Input.IsMouseButtonPressed(Input.MOUSE_BUTTON.LEFT))

Or you can use your own Player (PlayerActor for example) which is well controlled from editor settings by default.

Thanks!

×
×
  • Create New...