Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Problem with mesh collider in WebGL build

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

  1. AlexKolosov

    AlexKolosov

    Joined:
    Dec 20, 2014
    Posts:
    9
    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:
    Hey,

    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:
    https://issuetracker.unity3d.com/issues/webgl-rigidbody-not-colliding-with-specific-mesh-colliders

    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

    gorea01

    Joined:
    Nov 30, 2017
    Posts:
    1
    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

    chaosmaker

    Joined:
    Jul 21, 2013
    Posts:
    20
    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

    flynam

    Joined:
    Dec 27, 2015
    Posts:
    3
    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

    karsnen

    Joined:
    Feb 9, 2014
    Posts:
    7

    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

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    433
    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