Search Issue Tracker
By Design
By Design in 1.4.X
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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.
Resolution Note (1.4.X):
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.