Search Issue Tracker

Fixed in 2019.3

Fixed in 2018.4, 2019.2

Votes

10

Found in

5.5.0p3

Issue ID

879696

Regression

No

Adding Cloth component to SkinnedMeshRenderer changes its bounds

Physics

-

Reproduction steps:
1. Open project attached(UnityBugRepro.zip)
2. Open scene (test)
3. Select Rig_Male_Thief_Thug -> Rig_Male_Thief_Thug_Body
4. Add cloth component to it.

Expected result: SkinnedMeshRenderer bounds will stay in its place.
Actual result: SkinnedMeshRenderer bounds changes position.

Fixed in: 2019.3.0a3

Reproduced on: 5.3.7p3, 5.4.4f1, 5.5.1p3, 5.6.0b8.

Comments (28)

  1. 36c65e3934745df83910152c6a077e4a?d=mm

    shubhamswaraj2021

    Aug 18, 2020 05:33

    good one <a href="https://www.lyricsauto.com">lyricsauto</a>

  2. 1cd039b45b0f636bd9990ad25a8c59dd?d=mm

    Jaakk0S

    Jul 30, 2020 20:31

    Issue still present in 2020.1 version. Analysis: the Cloth vertex deformation code seems to constantly recalculate the SkinnedMeshRenderer bounds and it messes it up.

    Fix: add this script to your SkinnedMeshRenderer object or higher in hierarchy.

    using UnityEngine;

    public class FixClothBounds : MonoBehaviour {

    private SkinnedMeshRenderer[] Renderers;

    void Awake() {
    this.Renderers = this.gameObject.GetComponentsInChildren<SkinnedMeshRenderer>();
    }

    void OnRenderObject () {
    foreach (SkinnedMeshRenderer smr in this.Renderers) {
    smr.localBounds = new Bounds(Vector3.zero, new Vector3(10f, 0.2f, 10f)); // Paste your meshes real bounds here
    }
    }

    }

  3. 8da99f74795197c962d4c4cd081e9c31?d=mm

    GameDevDavid

    Jul 14, 2020 20:51

    Issue still occurs in 2019.4.0 and 2019.4.3. Is there plan to integrate fix to next LTS release?

  4. 6de45c1d7183c9f2b2f11c48cda4a3ec?d=mm

    sugh1939

    Jul 04, 2020 11:03

    Hi, thanks a lot for sharing this with me. I am starting a new startup and was reading a business plan on www.ogscapital.com/service/business-continuity-plan/ website and really liked it a lot. I will use this plan to make my startup successful.

  5. 6fb4d2637ba838becc92cc9bead52f96?d=mm

    manutoo

    Jun 18, 2020 14:54

    Still bugged for me in 2019.4.0 ... >_<

    It works a bit better if my root gameobject (not the root for the bones) scale is (1, 1, 1), but in that case some normals get messed up and the skinnedmesh still disappears when it shouldn't, although less obviously.

  6. B7f0983cba3215036af76fbb96d61bc6?d=mm

    Jarel

    May 11, 2020 23:32

    Also having a problem with this.

  7. 622a10791d2e0340e16c33611289c0ba?d=mm

    Horus_Sungod42

    Apr 30, 2020 15:12

    Bugged in 2019.3.5f1

  8. 81b587a1060ff43a54230092337f8090?d=mm

    TacticalShader

    Apr 24, 2020 07:38

    Still happening in 2019.3.7f1

  9. 2793b8cf6c19a4ad54f966dd5485ca9a?d=mm

    terry213

    Apr 20, 2020 02:57

    (Continuing on my last comment...) Also setting root bone on Skinned Mesh Renderer to None

  10. 2793b8cf6c19a4ad54f966dd5485ca9a?d=mm

    terry213

    Apr 20, 2020 02:53

    I'm using Unity 2019.3.0f3 and I think I may have found a solution, at least for simple cloth like a flag drooping down. I made a joint chain for a simple plane in maya, bind the plane to the joints, then export. Afterwards I put the binded plane in my scene and on Skinned Mesh Renderer component, I ticked Update When Offscreen to True. I'm not sure about other complicated meshes, but it seems having a joint hierarchy worked for me.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.