Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Objects moving when hitting Play

Discussion in 'Editor & General Support' started by unity_77jpmWPxFGO42Q, May 15, 2020.

  1. unity_77jpmWPxFGO42Q

    unity_77jpmWPxFGO42Q

    Joined:
    Oct 29, 2019
    Posts:
    2
    Hi everyone, first of all sorry for my bad english it isn't my native language so i try to do my best.

    Since the start of my project i had to wait like 1 second before press Play or it won't load properly. It wasn't a problem just wait for everything is ok then u can start move and do things but today after non-related changes (import HDRP, and some builds with Probuilder) all my characters do a strange movement when hit play and get bugged with colliders, idk if u understand so i post a video for you guys to understand:



    As you can see the mesh moves from collider and gets out.
    Hope you can help me people, i dont know what to do bc it seems like a bug.

    Thanks!
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    This could probably be all sorts of things. You should create a new scene with nothing in it, then add just one object, and see if this still happens. Chances are, it's a behavior on some script you've added to that scene that's behaving unexpectedly. You'll need to narrow that down.

    It's also possible you've changed some of the Time settings under Project Settings, which might throw things off. Maybe check on those?
     
  3. unity_77jpmWPxFGO42Q

    unity_77jpmWPxFGO42Q

    Joined:
    Oct 29, 2019
    Posts:
    2
    I guess didn't changed anything on Time setting but i will check.
    Thinking about problem with Colliders, terrain and animations, but this double boxcollider and the mesh out of capsule collider looks like a bug more than a 'movement' of the GameObject, i'll check and update.

    Thanks dgoyette!
     
  4. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    What do you mean by "double box collider?" You definitely need to make sure you don't have any colliders overlapping when the scene starts.
     
  5. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,890
    Ok I think I finally see what OP is talking about. The Humanoid character in the center of the screen: the rendered mesh is getting separated from the capsule collider.

    What does the object hierarchy for that character look like? What scripts are attached to the different pieces? Specifically you'll want to look out for anything that is modifying the transform.localPosition of any part of that hierarchy.