Hello. I’m new to Unity. I now want to develop my first game, but I’m facing a problem. My camera experiences microlags, which are noticeable both in the editor and in the build. At random moments the camera jerks sharply. I don’t know where I made a mistake, please help me. I am attaching the scripts below.
Pasting code in code tags is the preferred method of sharing code, it means people can search it, as well as highlight/copy/paste/recreate your issues
Also in FixedUpdate shouldnt it be Time.fixedDeltaTime
If you’re using MovePosition then you should enable isKinematic and interpolation on the rigidbody.
Or if you want the rigidbody to be stopped when colliding with walls you should replace MovePosition with AddForce:
_rigidbody.AddForce(move * _movementSpeed);
Leave isKinematic disabled if using AddForce.
When used in FixedUpdate Time.deltaTime returns Time.fixedDeltaTime.