I can´t figure out how to get the world position of vertices returned by mesh.vertices? Anyone knows how to do this? Many thanks, Raoul
Try adding the vertices position and the mesh's transform's position together. Possibly something like: Code (csharp): function Start () { var verticies : Vector3[] = GetComponent (MeshFilter).mesh.vertices; var globalPos : Vector3 = verticies [0] + transform.position; Debug.Log (globalPos.ToString ()); }
Unfortunately that method doesn't account for rotation. What you want is MultiplyPoint...check out the MeshCombineUtility script in Standard Assets for an example of usage. Although normally you can use MultiplyPoint3x4 which does pretty much the same thing, but faster. --Eric
Yes, I tried that Daniel but it fails as soon as you rotate the object (as Eric also posted). I will look at MultiplyPoint, thanks guys!