Search Unity

Mouse Y performing worse than Mouse X

Discussion in 'Editor & General Support' started by H2r_, May 4, 2021.

  1. H2r_

    H2r_

    Joined:
    Jul 5, 2019
    Posts:
    8
    Hello! I am trying to make a 3d first person character controller, so I set up a script that allows me to look around with the mouse(mouse X rotates player, and mouse Y rotates camera attached to the player). When moving on the X axis everything is fine, but when I move on the Y axis there is a slight stutter. I know that it is not an issue with my script, because I have tried a variety of different scripts and tutorials. I have also tried changing my the aspect ratio on my camera and messing around with the camera settings. Can anybody tell me what's happening. Thanks!
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You haven't shared any specifics, so all I can suggest is to first try a different mouse.
     
  3. H2r_

    H2r_

    Joined:
    Jul 5, 2019
    Posts:
    8
    Just tried a different mouse and it didn't help :(
     
  4. H2r_

    H2r_

    Joined:
    Jul 5, 2019
    Posts:
    8
    ezgif.com-gif-maker (1).gif heres a video. Both the Y and X axis are being done in the same way but only the Y has the issue.
     
  5. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    I'm going to go out on a limb and suggest the problem is probably in your script and/or scene setup.

    Could you post your code and also some screenshots of your hierarchy, showing which scripts are on which objects and the parent/child relationships between objects?
     
  6. H2r_

    H2r_

    Joined:
    Jul 5, 2019
    Posts:
    8
    Capture.PNG h.PNG here is the code and hierarchy setup. The script is on the object titled "Capsule" and uses references for both the Main Camera and Capsules transforms.
     
  7. H2r_

    H2r_

    Joined:
    Jul 5, 2019
    Posts:
    8
    I do not think it is an issue with the script or object placement however, because I have tried a variety of different scripts and placements and none of them have worked correctly.
     
  8. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    Well two things:
    - Mouse input axis should not use Time.deltaTime as they are already framerate independent
    - You have two different sensitivity variables for the two axes. Have you tried adjusting those values?
     
  9. H2r_

    H2r_

    Joined:
    Jul 5, 2019
    Posts:
    8
    I doubt thats it. I have tried other scripts that don't use delta time and they didn't work either. Currently the sensitivities are both the same. I can adjust the Y one to make it slower and it helps a little, but I don't want the Y to be slower than the X. Also, if it was an issue with scripts I don't know why it would affect Y differently than X, since they are done the same.
     
  10. unity_E8F97D1AC1678C8DCA8A

    unity_E8F97D1AC1678C8DCA8A

    Joined:
    Nov 4, 2022
    Posts:
    1
    having same issue still not fixed