Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug: Joystick yaw (Rz) not firing action callbacks

Discussion in 'Input System' started by Aaron-Static, Sep 17, 2019.

  1. Aaron-Static

    Aaron-Static

    Joined:
    Sep 22, 2012
    Posts:
    4
    Unity version: 2019.3b3
    Input system version: 0.9.6-preview
    Joystick: Saitek Pro Flight X-55 Rhino (stick)
    Axis: Rz (twist)

    Debug is showing values being read correctly from Saitek Pro Flight joystick, however the "OnYaw" action callback in my code is not being fired. All other action callbacks work fine including "stick" from the same joystick.




    Code (CSharp):
    1. public class PlayerControl : MonoBehaviour, InputMaster.IPlayerActions
    2.     {
    3.         private InputMaster input;
    4.         private Ship ship;
    5.  
    6.         public void OnFlight(InputAction.CallbackContext context)
    7.         {
    8.             Vector2 v = context.ReadValue<Vector2>();
    9.             ship.Stick.x = -v.x;
    10.             ship.Stick.y = v.y;
    11.         }
    12.  
    13.         public void OnYaw(InputAction.CallbackContext context)
    14.         {
    15.             ship.Stick.z = context.ReadValue<float>();
    16.         }
     
  2. JehovahsThickness

    JehovahsThickness

    Joined:
    Apr 14, 2016
    Posts:
    2
  3. Burnbox

    Burnbox

    Joined:
    Feb 5, 2014
    Posts:
    3