Ejemplo n.º 1
0
    public Sphere GetSphere()
    {
        var trans      = transform;
        var pos        = trans.position;
        var smoothness = m_UnityMaterial.GetFloat(Smoothness);

        return(new Sphere
        {
            material =
            {
                albedo    = m_UnityMaterial.GetAlbedo(),
                fuzziness = (1f - smoothness),
                type      = m_MaterialType
            },
            radius = trans.localScale.x / 2,
            center = pos,
        });
    }