Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Suggestion: Add the Sector Interactor from XR Interaction into vanilla Input System

Discussion in 'Input System' started by Dark-Table, Jun 10, 2021.

  1. Dark-Table

    Dark-Table

    Joined:
    Nov 25, 2008
    Posts:
    315
    The Sector Interactor that's part of the XR Interaction Tool Kit (currently in preview?) is really useful for turning analog stick input into compass directions (North, South, West East). It should be part of the default input system so that non-XR and sprite-based games can easily take advantage of it.

    Until then: You can copy SectorInteraction.cs and CardinalUtility.cs out of the "com.unity.xr.interaction.toolkit" package into your own project.
     
    Thomas-Mountainborn likes this.
  2. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    489
    I started a new project and had no idea where this went. Why is this not part of the default input system?
     
  3. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,015
    @Schubkraft what do you think? It's something basic.

    My use case: I want a binding of type Vector2 to be triggered only if Y is greater than 0 and the press point > 0.8. This cannot be achieved with the presspoint interaction + clamp processor because the processor is not executed before the interaction.

    The solution in my case has been to use the interaciton sector of XR Interaction Toolkit.

    upload_2023-3-3_8-48-50.png
     
  4. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,067
  5. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,015
    @Schubkraft I just made it but I don't hold out much hope that it will get anywhere but the bottom of a drawer.
     
    Thomas-Mountainborn likes this.
  6. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,067
    Thank you! In the grand scheme of things this will not be the top of the list soon. Sorry for that :(
     
    bdovaz likes this.