![]() ![]() ![]() They're not included in CharacterActions.Actions so I never scoop them up in the binding GUI. I'm trying to put some polish on controller bindings on the PC and I'm getting caught up on two-axis bindings. I'm pretty sure there's some direct way to do it, but I'm pretty new with using InControl and I'm a bit lost. I don't think getting up to the Touch.position is the way to go, seems too "low level" (and prone to errors with scaling and offsetting according the rect) and not in line with the level of abstraction provided by InControl. I believe it should be a single one line of code, but the more I get into the code, everything seems to be returning a delta.Įven getting a value in a range to remap onto another would do (using Lerp or InverseLerp).Ĭould you please help me or provide a hint in the right direction? Or a percentage, in a very indirect way, getting back to the touch. I'd love to get, in -1 to 1 range, raw or not, the exact current position of the LeftStick (a Vector2 possibly).ĭoesn't matter how I fiddled, but Value, X, Y, almost everything seems to return the current delta. Everything works fine with a workaround, but it's definitely ugly. I mapped a TouchTrackControl to the LeftStick. I believe I'm struggling for something which probably is so obvious that I can't see it. Question: What's the most direct way to get the absolute current position of the touch inside the window/rect specified by the TouchTrackControl? (which, of course may or may not be full screen, or just a scaled part of it?) (Patrick, I sent a second email but probably got lost in the process, so I'm also asking publicly since I believe it's trivial ) I wouldn't modify the original, just for the sake of maintenance for yourself going forward and it has other ties in the code for listening for user bindings, but since it's a toggle in your settings and you're presumably manually adding the binding it should be simple and you can also strip out anything to do with saving or loading the binding, unless you really want to add that.ĪddBinding can take any BindingSource as a parameter, so once you have your custom one just call Fire.AddBinding( new M圜ustomDeviceBindingSource( InputControlType.Action1, InputControlType.Action2 ) ) įor a more convoluted example, I've got an experimental ComboBindingSource (download here: ) which does a whole lot more than you need, but allows combining keyboard, mouse and device controls into a single binding. Honestly, if you copied DeviceBindingSource and called it something else it would take only very minor modifications to add a second InputControlType parameter. However, it would not be hard to implement a custom binding source yourself. Click to expand.Unfortunately, this isn't a built-in feature. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |