Search Issue Tracker
By Design
Votes
0
Found in [Package]
1.4.1
Issue ID
ISXB-261
Regression
No
Player input is jagged when using a gamepad and turning the right analog stick
How to reproduce:
1. Open the attached project “TutorialNewInput.zip“
2. Open the “FPSScene“ Scene
3. Enter the Play mode
4. Connect a gamepad
5. Turn the right analog stick to the right side
Expected result: The Camera rotates smoothly while rotating the analog stick
Actual result: The Camera’s rotation is jagged
Reproducible with: 1.1.0-pre.5 (2020.3.37f1), 1.4.1 (2020.3.37f1, 2021.3.8f1, 2022.1.12f1. 2022.2.0b3, 2023.1.0a4)
Couldn’t test with: 1.1.0-preview.3 and lower - errors in the Console window
Reproduced with: Windows 10 Enterprise
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- URP Realtime reflection probes do not update when RenderProbe() is being called once per second
- Addressable terrain shader variants are stripped from the Player
- [iOS] Debug.Log() appears as <private> in Console app
- UI stays in the background when it is disabled in simulator
- A wrong log file is attached when project is launched with a "-logFile" command line argument
Resolution Note:
The root problem is that a mouse camera movement only need to happen when mouse itself moves, while gamepad stick camera movement needs to happen every frame regardless if gamepad stick was moved or not, for example if we hold gamepad to the right such as resulting vector would be (1.0f, 0.0f), we still need to move camera to the right every frame even if stick itself is staying fully pressed to the right.
Hence why in the example provided "MouseLook_PlayerInput.LookAround" doesn't quite work, as it's only called when gamepad stick changes its value, and is not called if there is no change in value, hence why you observe camera moving only when stick is moved.
A correct use case would be to invoke this from Update and checking if action is performed, and if it is, moving the camera based on the value.