Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Problem with mesh collider in WebGL build

Discussion in 'Physics' started by AlexKolosov, Jan 21, 2018.

  1. AlexKolosov


    Dec 20, 2014
    Hello community.
    I have a problem with mesh collider on my mesh (made in 3ds max).

    Editor and Standalone build:

    WebGL build:

    I experimented with the change:
    1) fixed timestep value;
    2) Build settings -> Prebake collision meshes;
    3) Added rigidbody (Is Kinematick) on the plane;
    4) Added box collider and mesh collider on same time;
    5) Change rigidbody parameters: Collision Detection, Interpolate;
    6) Project Settings -> Physics - Default contact offset;
    7) Scale the plane.

    I created bug-report and the unswer was:

    This seems to be due to a precision problem. I am afraid we can't fix it at the moment so I will close this bug report.
    However, as a workaround, try to reduce "Fixed Timestep" in your Project's Time Settings.
    Mentioned settings can be found here - Edit > Project Settings > Time

    Reference to the original case:

    Tested in different vesion of unity3d: 2017.3.0p1, 2017.3.0p3, 5.6.2f1

    Assets attached below

    Attached Files:

    chaosmaker likes this.
  2. gorea01


    Nov 30, 2017
    i has similar issues and in my case i was using "GameObject.CreatePrimitive" and instead i made a prefab and used "GameObject.Instantiate" and my issue was fix, maybe this will help, cheers.
  3. chaosmaker


    Jul 21, 2013
    No words about this problem? Looks like there is a lot of people having mesh collider problems in WebGL that does work on all other platforms...
  4. flynam


    Dec 27, 2015
    I had the same problem. I thought the issue was related to the fact that I was building a mesh at runtime but it seems that even standard meshes have the same collider problem in WebGL builds. It’s erratic though as the rays are caught in certain areas of the screens. I can’t explain it. Anyway after a lost day, I rolled back to Unity 2017.3 and the problem is now gone.
  5. karsnen


    Feb 9, 2014

    hello flynam, can you mention the exact version of Unity 2017.4 you rolled back to. I've tried with 2017.4.4.f1 and 2017.4.5f1- only to fail.
  6. tomekkie2


    Jul 6, 2012
    I have the same issue in 2018.1.1
    I have changed the Fixed Timestamp from 0,02 to 0,006 - but it did not help.

    I have just a flat chamfered square one sided mesh.
    The Mesh collider doesn't work on it in WebGL.
    When I changed it to box collider it is working, but the box collider doesn't fit my purpose, because it works on all sides, while I need one side only.
    Last edited: Jun 18, 2018