I would like to change the size of the vertices in a mesh that is being procedurally generated but I am unsure how to do so
Here is the mesh generation code:
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))]
public class PointCloudTestMesh : MonoBehaviour {
private Mesh mesh;
int numPoints = 100;
// Use this for initialization
void Start () {
mesh = new Mesh();
GetComponent<MeshFilter>().mesh = mesh;
CreateMesh();
}
void CreateMesh() {
Vector3[] points = new Vector3[numPoints];
int[] indecies = new int[numPoints];
Color[] colors = new Color[numPoints];
for(int i=0;i<points.Length;++i) {
points *= new Vector3(Random.Range(-10,10), Random.Range (-10,10), Random.Range (-10,10));*
_ indecies = i;_
_ colors = new Color(Random.Range(0.0f,1.0f),Random.Range (0.0f,1.0f),Random.Range(0.0f,1.0f),1.0f);
* }*_
* mesh.vertices = points;*
* mesh.colors = colors;*
* mesh.SetIndices(indecies, MeshTopology.Points,0);*
* }*
}
What do I need to do to get these vertices to be a different size?