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
- Static Editor Flags dropdown list is cut off when Inspector Window is docked to the very right and UI Scaling is set to a higher value
- visionOS Players are minimized when Guided Access is turned on
- Licensing Client fails to launch when opening Unity Hub
- Sprite Atlas Inspector preview disappears when entering Play mode unless SpriteAtlasMode is set to "Sprite Atlas V2 - Enabled"
- Opening reference for Audio Importer opens missing page
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.