tylerwsavatronix
Topic Author
Posts: 13
Joined: 07 Mar 2017, 11:45

A question about input

26 Jan 2023, 17:46

Hi there,

In our project we're utilizing the new input system (previously we've used cinput2 after deciding to never touch the now-legacy input system due to all of its limitations and shortcomings). We want virtually all player keybinds to be configurable, as well as having a command/action based input system and the new input system does that wonderfully.

I'm aware that Noesis doesn't currently support the new UI system for its keybinds and such, and that noesis also makes some assumptions about what keys will be pressed for some functionality (for example, tab cycling), and that it seems to also be common to define specific keys for UI interactions via the keybinding class instead of defining actions.

In our situation that would lead to very undesirable situations. We'd be in a position where we're managing which action maps are active depending on game state, any action can be bound to any key, and noesis itself would be intercepting key input and doing its own thing which would lead to potentially unpredictable behavior depending on how the user sets up their keybinds, as well as result in us having to essentially manage and maintain two completely separate input systems.

Is there a way for us to manually trigger the functionality that comes built in with Noesis controls? For example say we have an action for "cycle UI focus" and have it set to raise an event. That event gets handled in one of our classes that's aware of the current view (probably the code behind or something else that knows about the view and its elements) and tells it to cycle?

Or is this more of a situation where we'd need to write our own behaviors replicating built in functionality and trigger them ourselves?
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: A question about input

27 Jan 2023, 12:38

For Noesis 3.2, we have plans to remove the legacy input system and start using the new input system for everything (right now it is only used for gamepad actions).

As part of this transition, we are thinking about exposing a few configurable actions for specific keys (space, enter, arrows), that way they can be configured. We don't think it makes sense doing this for all keys (like exposing actions for the keys 'A', 'B', 'C' and so on) right? For the mouse we could do the same and expose actions for the mouse buttons as Unity UI is doing.

On top of this, in Unreal we have an InputActionTrigger for Unreal Actions.
<Grid
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  xmlns:noesis="clr-namespace:NoesisGUIExtensions">
    <b:Interaction.Triggers>
      <noesis:InputActionTrigger Action="Fire" Type="Pressed" Consume="False">
        <b:ChangePropertyAction TargetName="rect" PropertyName="Fill" Value="Red"/>
      </noesis:InputActionTrigger>
    </b:Interaction.Triggers>
    <Rectangle x:Name="rect" Fill="Transparent"/>
</Grid>
I think we should do the same for Unity actions, right?
 
tylerwsavatronix
Topic Author
Posts: 13
Joined: 07 Mar 2017, 11:45

Re: A question about input

27 Jan 2023, 14:14

For Noesis 3.2, we have plans to remove the legacy input system and start using the new input system for everything (right now it is only used for gamepad actions).
Oh that's excellent and more or less would solve the issue. I hadn't seen that posted anywhere. The last forum post I found about it was that you might reconsider it in the future (last year I think).
As part of this transition, we are thinking about exposing a few configurable actions for specific keys (space, enter, arrows), that way they can be configured. We don't think it makes sense doing this for all keys (like exposing actions for the keys 'A', 'B', 'C' and so on) right?
I don't think I fully understand what you mean by exposing configurable actions for specific keys. I think what would make the most sense is not having any hard-coded keybinds at all though, and allowing us developers to map an action (unity input action, or similar concept - an abstraction to the actual keys) to built in noesis functionalities. From, ultimately the player's perspective they should be able to rebind everything in the game to suit their needs. That's the most accessibility-friendly option.
I think we should do the same for Unity actions, right?
I'm not familiar with Unreal's system, but that looks to be about the same for Unity's new input system and is more or less how I'd envision it working.

To pull xaml from the menu3d, I'd imagine something like this.
<b:ActionTrigger Action="MenuBack" ActiveOnFocus="True">
    <b:PlaySoundAction Source="Sounds/WaterDropBig.mp3" Volume="0.5"/>
    <b:InvokeCommandAction Command="{Binding Back}"/>
</b:ActionTrigger >
And for things that were taken from WPF that assume only specific keys, like KeyboardNavigation it's a good case for extending from WPF's to provide the same functionality, like so
<Grid x:Name="MenuOptions" Grid.Row="1" Margin="0,30,0,0" RenderTransformOrigin="0.5,0.5"
                    InputActionNavigation.TabAction="NavigateCycle"
                    InputActionNavigation.TabActionNavigationMode="Cycle"
                    InputActionNavigation.DirectionalNavigation="Cycle" VerticalAlignment="Top">
</Grid>
Though that probably needs a bit more thought since, in theory, one could add different combinations of actions to navigation modes and such like you could with KeyboardNavigation and assigning, say Continue to ControlTabNavigation while having the normal TabNavigation be set to cycle. Not sure that's an actual compelling use case though.

Is there any estimate for 3.2's release? Q2, H2, longer? Our current project is estimated to take about the next 8 - 14 months depending on what scope creep slips in.
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: A question about input

27 Jan 2023, 15:19

I don't think I fully understand what you mean by exposing configurable actions for specific keys. I think what would make the most sense is not having any hard-coded keybinds at all though, and allowing us developers to map an action (unity input action, or similar concept - an abstraction to the actual keys) to built in noesis functionalities. From, ultimately the player's perspective they should be able to rebind everything in the game to suit their needs. That's the most accessibility-friendly option.
For example, our Key enumeration has 191 values including all keyboard keys. If I understand you right, you mean we should expose all these 191 values as actions that our customers can bind. Does it make sense, for example, to expose "Key.A" to be remapped?
Is there any estimate for 3.2's release? Q2, H2, longer? Our current project is estimated to take about the next 8 - 14 months depending on what scope creep slips in.
Beta 1 was already released on December. Beta 2 (without Unity) is planned for next week. You can expect Beta3 after a few weeks more. But, definitely, final 3.2 is happening before GDC23.
 
tylerwsavatronix
Topic Author
Posts: 13
Joined: 07 Mar 2017, 11:45

Re: A question about input

01 Feb 2023, 03:27

For example, our Key enumeration has 191 values including all keyboard keys. If I understand you right, you mean we should expose all these 191 values as actions that our customers can bind. Does it make sense, for example, to expose "Key.A" to be remapped?
I would say that depends. If all 191 values are pre-mapped to functionality or not. Really it's the functionality that needs to be bindable to any key (or modified keys), not the actual keys themselves. So if there's 191 different keybound functionalities that Noesis has among the various controls, then yes all 191 should be mappable.

Instead of "Key.A" being exposed for remapping, it should be something like "Navigate.Left='Key.A' and/or "Navigate.Left='NavigateLeftInputAction' for Unity and Unreal. Could probably even do the latter for the non-engine versions using an input action interface.
Beta 1 was already released on December. Beta 2 (without Unity) is planned for next week. You can expect Beta3 after a few weeks more. But, definitely, final 3.2 is happening before GDC23.
Oh sweet, that works great. Thank you.
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: A question about input

02 Feb 2023, 18:15

Instead of "Key.A" being exposed for remapping, it should be something like "Navigate.Left='Key.A' and/or "Navigate.Left='NavigateLeftInputAction' for Unity and Unreal. Could probably even do the latter for the non-engine versions using an input action interface.
The GamePad is already exposing bindable actions using the new input system. It is missing a non-directional navigation event (TAB right now) that we could add.
To pull xaml from the menu3d, I'd imagine something like this.
<b:ActionTrigger Action="MenuBack" ActiveOnFocus="True">
    <b:PlaySoundAction Source="Sounds/WaterDropBig.mp3" Volume="0.5"/>
    <b:InvokeCommandAction Command="{Binding Back}"/>
</b:ActionTrigger >
Could you please create a ticket for this?
 
tylerwsavatronix
Topic Author
Posts: 13
Joined: 07 Mar 2017, 11:45

Re: A question about input

03 Feb 2023, 21:06

Could you please create a ticket for this?
Sure, quick question about the bugtacker. Is it a separate login from the forum login?

When I try to log in using the same credentials I get an error. Just want to make sure before making a new account if that's necessary.
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: A question about input

03 Feb 2023, 21:10

Sure, quick question about the bugtacker. Is it a separate login from the forum login?
Yes, sorry about that. You need to create a new account. One day, we will fix that :)
 
tylerwsavatronix
Topic Author
Posts: 13
Joined: 07 Mar 2017, 11:45

Re: A question about input

07 Feb 2023, 00:27

Yes, sorry about that. You need to create a new account. One day, we will fix that :)
Done and ticket submitted (also submitted an unrelated bug about some NoesisView properties not being available in code).
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: A question about input

09 Feb 2023, 14:27

Thanks for the tickets! (#2502, #2503)

Who is online

Users browsing this forum: Ahrefs [Bot] and 10 guests