Skip to content
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

Is it possible to map an analog stick to a number of images that will fill up like a trigger? #198

Open
leighhobson89 opened this issue Aug 21, 2021 · 3 comments

Comments

@leighhobson89
Copy link

I have created an interface texture for flight simulator where I have a set of four images which i want to fill up like a trigger element, but in relation to how much the stick is pressed in certain directions.

So I push up and left, about half way, and the up and the left image fill half way each, I think that explains the concept enough.

There are no alternatives really as I want to use this for flight simulator and have images for pitch up/down and roll left/right, rather than a stick moving about. I will paste my texture below so you can see what my plan is and tell me if it is possible or if it can be implemented in the future if not. TIA.

FSOverlay2

@leighhobson89
Copy link
Author

In case that something could be done in the .json file for it, it is here, but the 4 images are set as analog left stick so they obviously all just move around together. I can see that the functionality is there between the analog stick and the trigger to do what i need, but I'm just not sure if there is a way to bridge between them somehow for this purpose. TIA.

{ "default_width": 0, "default_height": 0, "space_h": 0, "space_v": 0, "flags": 6, "overlay_width": 379, "overlay_height": 221, "elements": [ { "type": 2, "pos": [ 249, 155 ], "id": "gamepad button0", "z_level": 0, "mapping": [ 101, 400, 54, 52 ], "code": 60419 }, { "type": 2, "pos": [ 80, 171 ], "id": "gamepad button1", "z_level": 0, "mapping": [ 53, 477, 45, 41 ], "code": 60425 }, { "type": 2, "pos": [ 5, 169 ], "id": "gamepad button2", "z_level": 0, "mapping": [ 7, 455, 20, 52 ], "code": 60417 }, { "type": 2, "pos": [ 5, 120 ], "id": "gamepad button3", "z_level": 0, "mapping": [ 30, 455, 20, 52 ], "code": 60416 }, { "type": 2, "pos": [ 297, 1 ], "id": "gamepad button4", "z_level": 0, "mapping": [ 101, 509, 82, 25 ], "code": 60421 }, { "type": 2, "pos": [ 0, 0 ], "id": "gamepad button5", "z_level": 0, "mapping": [ 185, 509, 81, 25 ], "code": 60420 }, { "type": 6, "pos": [ 189, 154 ], "id": "trigger6", "z_level": 0, "mapping": [ 315, 435, 42, 62 ], "direction": 1, "trigger_mode": false, "side": 1 }, { "type": 6, "pos": [ 145, 154 ], "id": "trigger7", "z_level": 0, "mapping": [ 269, 435, 42, 62 ], "direction": 1, "trigger_mode": false, "side": 0 }, { "type": 5, "pos": [ 42, 47 ], "id": "analog stick8", "z_level": 0, "mapping": [ 2, 2, 147, 170 ], "stick_radius": 20, "side": 0 }, { "type": 5, "pos": [ 188, 47 ], "id": "analog stick9", "z_level": 0, "mapping": [ 230, 2, 147, 169 ], "stick_radius": 20, "side": 0 }, { "type": 5, "pos": [ 147, 113 ], "id": "analog stick10", "z_level": 0, "mapping": [ 159, 416, 84, 43 ], "stick_radius": 20, "side": 0 }, { "type": 5, "pos": [ 144, 68 ], "id": "analog stick11", "z_level": 0, "mapping": [ 157, 321, 90, 45 ], "stick_radius": 20, "side": 0 } ] }

@univrsal
Copy link
Owner

yeah it's possible, but I can't tell you when I'll have the time to add it

@leighhobson89
Copy link
Author

Thanks for reading my comment. Life is busy thats true, if you ever get a chance to add it, it would be an enormous help, I'd really appreciate it. Thank You in Advance! 🙂🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants