-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented camera controls to face compass points #12
base: master
Are you sure you want to change the base?
Conversation
Sorry for the late response, please update your code to the newest commit so i can test and merge it. |
Camera controls now should be working on newest commit |
Better, but please change the int camDirection to an Enum something like this:
And maybe even save the value to the settings and read it back when the mod starts. Currently the LeftDpad button (and maybe other Dpad buttons in the future) is used to detonate grenades and other throwable weapons. I think we have to move this mechanism to Player 1's control, also please add documentation to your code. And please comply with C#'s naming conventions. This will make the code more readable for you, for me and for others. Its surely a nice addition and i thank you for your input! |
Changed to using enums, moved camera controls to numpad or P1 controller left stick+LB. Tidied up code and added some more comments, please let me know if there is still stuff that could be improved (my C# knowledge is based off the hackiest C that just about runs). I have left settings alone as I don't want to mess up any of the rest of the config values (also it's pretty quick to switch in game). |
Looking much better like this, but there is a small problem, when player 1 is in a vehicle it wont work because Game.IsControlPressed(0, GTA.Control.Cover) returns false i think. |
Players in vehicles can now switch camera angle by using the same controller buttons (RB + Angle) or X + Numpad
Players in vehicles can now switch camera angle by using the same |
Players are able to set camera to face in North, South, West or East by using the DPad in the direction they wish the camera to face.
Controls are transformed to match the direction the camera is facing (in most if not all cases, I couldn't quickly find any where my characters weren't doing so).
Minimap also updates to face the direction of the camera.
Possible improvements could be made to allow for free camera rotation or 8 points, but the effort required to make this happen might outweigh the benefit (plus a constant line of reference may help players orient themselves).