OpenAWE-Project / OpenAWE

A reimplementation of Remedy Entertainments Alan Wake Engine, in later iterations known as the Northlight Engine
GNU General Public License v3.0
159 stars 13 forks source link

Add initial support for mouse and gamepad input #29

Closed maaxxaam closed 1 year ago

maaxxaam commented 1 year ago

Adds support for capturing and adding bindings to mouse movement and button clicks. Also adds an option to lock mouse inside game's window. Includes a modified ControlledFreeCamera that uses mouse movement for camera rotation.

Related to #13

maaxxaam commented 1 year ago

Noticed something weird: I cannot use my laptop's trackpad together with the keyboard - looks like mouse movement events get suppresed. External mouse works okay though.

Edit: after some research, it appears that this behaviour comes from OS settings and has nothing to do with the engine itself.

maaxxaam commented 1 year ago

Commit a520a7e changes the keyboard layout: WASD, R/F and T/G have not changed. Camera rotation uses Arrow keys (both horizontal and vertical rotation), and camera rotation sensitivity can be changed separately now with Y/H. Q allows switching between arrow keys and mouse movement for camera rotation control.

Nostritius commented 1 year ago

Merged, Thanks :)

Nostritius commented 1 year ago

If you are interested, I have recently added support for moving Alan with very basic animations. If you want you could try to implement his Orbital Cam.