Hi Levo,
Please bear in mind that the game view is just a laggy preview. Don’t try to make the game feel perfect there. If you are in doubt whether the problem is caused by the preview or by something in your game, build your game, and test the build. The build is your actual game, not the preview in the Unity Editor.
If you get the same problem in the build, there could be multiple reasons for this undesired behaviour.
-
The camera renders randomly. If you use the cinemachine in your game, select the game object with the CinemachineBrain component. Set the ‘UpdateMethod’ to ‘Late Update’. You may also test ‘FixedUpdate’.
-
We rotate the player with a Rigidbody2D method. Create a new method in your PlayerControllerClass: FixedUpdate. That’s a Unity method like Update and Start. Move the AddTorque method call to the FixedUpdate method. Do not use
Time.deltaTimein FixedUpdate. Save your script.
Did this fix the problem?
See also:
- Forum User Guides : How to mark a topic as solved