Skip to content

Call to Move should be moved from Update to FixedUpdate #113

Description

@fabiocogliati0

I've tried to import the script into my project and i notice that my character begins to jitter when it enters in collision with the ground. I've notice that in your project you enabled the project settings physics 2D option "AutoSyncTransforms". Due to performance issues this is not recommended by Unity (https://docs.unity3d.com/ScriptReference/Physics2D-autoSyncTransforms.html). The cleanest way to fix this problem is moving your character demo logic from "Update" to "FixedUpdate". This because Unity will always sync transforms in a moment after the update function and before the first FixedUpdate of the frame.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions