I have issues to sync the character movement using physics (to allow interoperate with any physic object in the scene in real way) and the camera follow the character.
For the camera im using LateUpdate and Lerp to follow the character smoothly.
And for the character movement im using this:
RigidBody body = transform.GetComponent<RigidBody>();
float yVel = body.velocity.y; // Store Y force to dont override gravity
Vector3 movement = new Vector3(moveHorizontal, 0f, moveVertical);
Vector3 newVel = movement * speed;
newVel.y += gravityReduction;
body.MovePosition(transform.position + (newVel * Time.fixedDeltaTime));
But I notice a micro shutter in the character itself when the camera moves following with some delay, and is more notizable if you reach many FPS. I try with V-sync on/off and also with this methods for the character movement:
LateUpdate + Time.fixedDeltaTime = Inconstent movement, more FPS → faster movement
FIxedUpdate + Whatever = Micro Shutter on character
Update + Time.deltaTime = Inconsistent movement to
When I select the character element in the editor the movement speed changes (because the FPS in the editor is lower) also if the FPS jump, you notice how the character change the movement speed.
Is there a way to move physic object with fixed movement independent of the FPS and get no shuttering?