Search Unity

Resolved Mouse axes gets frequently large values back

Discussion in 'Input System' started by db-project, Jan 4, 2023.

  1. db-project

    db-project

    Joined:
    Jan 4, 2023
    Posts:
    3
    Hello, I was wondered why my 3rd person player change the rotation extremely fast while running or looking around with mouse movements. It looks like stopping or delaying and jumping into a new position immediately.

    I found out, that the mouseX and mouseY axis gets back an extremely high value. 10 times greater than normal. I get this high value every 8 to 10 seconds.

    So I create a simple test in a new clean project. For better understanding what happends, I leaved out Time.deltatime and mousesensitivities.
    I started the project which gets out a debug line with the values of x axis or y axis if they are greater then one. I moved the mouse slowly and constantly that the normal value is in range between zero and lower one. I could check this out with the public float field in the inspector.

    (The image shows the example project to read out the big values of mouse movement in x axis.)
    Unity_mousekicks.jpg

    But sometimes, after about every 8 to 10 seconds, I’ll get a value greater than 1 in range of 3 up to 9. Remember, my speed of mouse movement is still the same between zero and one. I tested out the x and the y axis. Both axes the same problem.

    I also multiplied the value with Time.deltaTime * 300 for mousesensitivity but the same worst result. The value blowed up from 1. to 550.


    With this value kicks it isn't possible to make a smooth movement or rotation.

    I checked out the mouse driver an tried it with an other mouse, but the same.

    Someone know this, is this a bug?

    Can someone help?

    thx
     
  2. db-project

    db-project

    Joined:
    Jan 4, 2023
    Posts:
    3
    Update.

    So, it seems that this problem affects the unity 3d templates with URP package.
    In regular 3d core templates with the build in renderer package, there are no problems with mouse movement.

    Is there any way to configure the 3d URP project that solve this problem?

    thx
     
    Last edited: Jan 5, 2023
  3. db-project

    db-project

    Joined:
    Jan 4, 2023
    Posts:
    3
    Solved!

    The incremental garbage collection in 3D URP template was disabled by default.
    After enabled it under project settings, the problem was gone.