Search Unity

[RESOLVED] Problem with physics after updating Unity to 2018.3 - "Simplex input points; coplanar..."

Discussion in 'Physics' started by DanijelM, Dec 21, 2018.

  1. DanijelM

    DanijelM

    Joined:
    Dec 20, 2017
    Posts:
    20
    Greetings ladies and gents. I've started getting an error in Unity that I simply do not understand what it means:

    "[Physics.PhysX] QuickHullConvexHullLib::findSimplex: Simplex input points appers to be coplanar"

    A normal Physics.Raycast, that worked absolutely normally up until the update is pushing the error. It is possible however that I simply didn't encounter the problem before by pure luck.

    Does anyone have an idea what the error actually means and where I should look to fix the issue?
     
  2. DanijelM

    DanijelM

    Joined:
    Dec 20, 2017
    Posts:
    20
    Managed to get rid of the error. I still don't know exactly what it means, but it seems to be linked to object scale.

    So in case anyone comes here looking for an answer, please check that a transform isn't trying to scale down below 0 on any axis. A faulty script caused one of my transforms to do just that. Clamping the scale prevented both the scale-related warnings and the physics error. It did in my case anyway.
     
  3. Lynxed

    Lynxed

    Joined:
    Dec 9, 2012
    Posts:
    121
    I disagree with calling it a solution. Negative scales is an important feature. If they suddenly don't work in 2018.3, that would be bad, because I kind a happen to need those in my project.
     
  4. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi
    Same problem here.
    Sorry for my little English DanijelM, but did you fix this problem? If it is like that, Could you explain me step by step what you did?
    In my case the error code is the following in VolumetricFog.cs( Line 490)

    m_InjectLightingAndDensity.Dispatch(kernel, m_VolumeResolution.x/m_InjectNumThreads.x, m_VolumeResolution.y/m_InjectNumThreads.y, m_VolumeResolution.z/m_InjectNumThreads.z);

    Thanks for your time and to understand
     
    Last edited: Jan 15, 2019
  5. sarebots2

    sarebots2

    Joined:
    Jul 4, 2016
    Posts:
    34
    Same problem with scaling convex mesh collider. I was scaling the parent object to 0.001 which caused the issue, fixed it by changing to 0.01 instead
     
  6. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    433
    It took me a while to debug this issue, in summary, you can not set MeshCollider.convex == true while its vertices are coplanar. Scaling any axis to almost zero is one way, using a plane-ish mesh is another possible way, which is not "convex".
     
    GermiyanBey, ksf000 and jaydentaylor like this.
  7. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I'm getting this error in calling OverlapSphereNonAlloc.

    Code (CSharp):
    1. if (this._currentRadius > 0)
    2. {
    3.     // It seems this can case issues when radius is 0, so we only do this when radius is non-zero.
    4.     var overlapCount = Physics.OverlapSphereNonAlloc(this.transform.position, this._currentRadius * 1.25f, _overlapping, LayerUtil.DisplacesRiftsMask);
    5. }
    From this code, I'm ensured that the radius of the OverlapSphere is greater than zero. I'm guessing the issue here is that the sphere is overlapping some collider whose scale is zero, but I'm not sure which object that might be. Any ideas on how to determine which object would be causing this?
     
  8. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I thought about this a little more, and realized it should be pretty simple to figure out the cause of the scaling, since any scaling must be being done by code I wrote somewhere in my project. So there were only a handful of cases where I changes localScale, and one of them turned out to go down to zero. (It's a script that fades and scales objects when they've been off-screen long enough, to clean things up.) I just made sure not to let scale go to zero, and this resolved my issue.

    So, hopefully it's simple enough for others to determine which of their objects are going to zero scale, and take measures to avoid going all the way to zero. In my case, I just don't allow the scale to be any less than 0.0001, and it works fine.
     
  9. Irin

    Irin

    Joined:
    Jan 22, 2014
    Posts:
    6
    I just got this same error randomly. Like, why is Unity 5 so buggy and broken?
     
  10. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    It's probably not random. It's probably just the result of an unlikely combination of factors. In my case, I would get this only occasionally, because it was very rare for all the right conditions to be in place for this to occur. I'd recommend look over your code for any cases where you adjust the localScale or lossyScale of an object and see if it's conceivable that the scale could be getting set to 0.