hey all…I am wondering about generating meshes. The scenario is a single generated mesh (a quad) and I have an object above it, projecting using the standard ‘light’ projector shader. The projection refuses to go onto my generated quad but will go on anything else in unity that I make from the menu such as the plane. Does this make sense?
I made some buildings in blender and set up a UV map and its fine. I don’t want to create a quad in blender!
eg I have terrain, the projection casts correctly, but not on the quad. A normal box with material? a plane with material? fine…but my plane with same material…no good?
I want to use my single quad code, so I can keep the poly count down
if I cant figure it out by the end of the day, I might end up using a plane, but I would rather figure it out then skip it ![]()
I might actually spit out all the values of the mesh from a plane and my generated mesh…i really need to work this out going forward.
using UnityEngine;
using System.Collections;
public class Person : MonoBehaviour {
public Vector3[] newVertices;
public Vector2[] newUV;
public int[] newTriangles;
public Texture2D[] textures;
public float fps;
// Use this for initialization
void Start()
{
Mesh mesh = new Mesh();
GetComponent<MeshFilter>().mesh = mesh;
mesh.vertices = newVertices;
mesh.uv = newUV;
mesh.triangles = newTriangles;
mesh.RecalculateNormals();
}
// Update is called once per frame
void Update ()
{
int index =(int)(Time.time * fps);
index = index % textures.Length;
renderer.material.mainTexture = textures[index];
}
}
is it possible using png 8 textures could cause it? - but my buildings work fine with png 8’s …nope - damn!