Search Issue Tracker
Fixed in 2022.1.X
Votes
0
Found in
2022.1.0a2
Issue ID
1352668
Regression
No
Mouse look script is frame rate dependent in the URP template project
In the empty URP project template, inside Assets/Scripts/SimpleCameraController.cs, there's this like of code:
// Rotation
if (IsCameraRotationAllowed())
{
var mouseMovement = GetInputLookRotation() * Time.deltaTime * 5;
It incorrectly multiplies the mouse movement by delta time, causing it to become frame rate dependent. Mouse input is already frame independent as it's expressed in raw movement units, rather than a state (like keyboard keys) that affects movement over time.
Reproduction steps to see it in action:
1. Create an empty URP project
2. Enter playmode
3. Hold down the right mouse button to enable mouse look, move the mouse and notice its sensitivity.
4. Go to gameview settings and enable VSync
5. Hold down the right mouse button to enable mouse look, move the mouse and notice that the sensitivity isn't the same as it was before enabling VSync.
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
- Crash on ResizeScriptingList<ScriptingObjectPtr> when passing an undeclared variable to the results parameter for GameObject.FindGameObjectsWithTag
- [Android] "Screen.safeArea.y" always returns values outside of the Safe Area when the device is in Portrait orientation
- Frame spike due to many TreeRenderer.TreeUpdated calls when repositioning terrains in large Scenes
- Crash on GameObject::RemoveComponentFromGameObjectInternal when reparenting Text GameObjects
- [IL2CPP-GarbageCollector] Changing GCMode might permanently disable GC in a multithreaded context
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0a6