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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

New Input System Updating Slowly

Discussion in 'Input System' started by Marvin-Krist, Feb 6, 2020.

  1. Marvin-Krist

    Marvin-Krist

    Joined:
    Sep 25, 2015
    Posts:
    14
    Hey, so I have a character, who aims 360 degrees around him at the R-joystick direction.
    Before, his weapon was moving smoothly around him when moving the R-joystick,
    But now, the weapon movements are discontinuous, as if the weapon teleports discontinuously around the character (small distances).
    I don't know when and why this problem happened, I did not change the code.
    This may be a problem of Updates, or Input System Settings, idk...

    Heres the gameview with explanation of the aim movements + the input system settings.

    And heres the code for the aim direction

    Code (CSharp):
    1.  
    2. if (Mathf.Abs(aimDirection.y) > 0.5 || Mathf.Abs(aimDirection.x) > 0.5)
    3.         {
    4.             if (aimDirection.x > 0)
    5.             {
    6.                 myWeapon.transform.localScale = new Vector2(1, 1);
    7.                 myCharacter.transform.eulerAngles = new Vector3(0, 0, 0);
    8.                 lastAimDirection = aimDirection;
    9.                 myWeapon.transform.right = aimDirection;
    10.             }
    11.             if (aimDirection.x < 0)
    12.             {
    13.                 myWeapon.transform.localScale = new Vector2(1, -1);
    14.                 myCharacter.transform.eulerAngles = new Vector3(0, 180, 0);
    15.                 lastAimDirection = aimDirection;
    16.                 myWeapon.transform.right = aimDirection;
    17.             }
    18.         }
    Thx for your help.

    img1.png inputsettings.png
     
  2. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Was the "before" state using a different version of the input system as compared to "after"? Or did the Unity version change?

    In either case, if you got smooth input with the same setup before and now you don't, it does sound like a regression. Please file a bug with the Unity bug reporter in that case.
     
  3. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Hi @AyoubGharbi, appreciate the post but please open a new thread rather than posting in another user's thread with an unrelated post.
     
    AyoubGharbi likes this.
  4. Marvin-Krist

    Marvin-Krist

    Joined:
    Sep 25, 2015
    Posts:
    14
    Hey, unity and input system versions did not change.

    I have send a bug report with unity editor rep.png

    Also i made the weapon rotating around the character using input.mouseposition, it worked perfectly using the same code, everything smooth. Don't know if it can help you.

    EDIT: the movements are smoother with the joystick when I do not push the joystick at his maximum (when the mushroom is not touching the controller).
     
    Last edited: Feb 6, 2020