ApplyMatrix() public method

public ApplyMatrix ( Matrix4x4 m ) : void
m UnityEngine.Matrix4x4
return void
Exemplo n.º 1
0
    public void GenerateSolid()
    {
        // Try to grab any meshes this is attached to - if not, allow setting!
        MeshFilter mf = gameObject.GetComponent<MeshFilter> ();
        if (mf == null) {
            Debug.LogError ("No mesh filter to get vertices from.");
            return;
        }

        solidObject = new Solid (mf.sharedMesh.vertices, mf.sharedMesh.triangles, mf.sharedMesh.colors);
        // Make sure the transform has been pushed into the solid.
        solidObject.ApplyMatrix (gameObject.transform.localToWorldMatrix);
    }