Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Bug SkinnedMeshRenderer calling Physics.SyncTransforms, even without Animator.

Discussion in 'Physics' started by Ashanex, Mar 9, 2024.

  1. Ashanex


    May 2, 2019
    I've discovered something that I can't find a fix for:
    1. I have a GameObject that contains a SphereCollider.
    2. This GameObject has a mesh as it's child that uses a SkinnedMeshRenderer.
    3. For some reason the Skinned Mesh Renderer is triggering the Physics.SyncTransforms() function. Sometimes up to 9 times per frame randomly.
    4. When I have 5000 of this types of GameObjects the Physics system has a 12-13 ms cost even when I'm doing nothing with the GameObjects.
    5. If I move the GameObjects with the SkinnedMeshRenderer removed, Physics.SyncTransforms() does get called, but it only costs 1ms.
    6. Using a Mesh Renderer instead of a SkinnedMeshRenderer does not call Physics.SyncTransforms().
    7. The SkinnedMeshRenderer does have an Animator in the parent, with "Animate Physics" set to false.
    8. I've tried removing all components and only leaving the parent Collider and the SkinnedMeshRenderer, but the issue persists.
    9. I've tried moving the collider to a second child so that the SkinnedMeshRenderer isn't a a child of a collider, still the same issue.
    10. I've tried setting the Physics Simulation mode to Script and then only call it once per frame a "GameManager" Update void, still same performance issue.
    Any help would gladly be appreciated. Thanks for your time!

    I've created a bug report: CASE IN-70583
    Last edited: Mar 9, 2024