StaticMesh - Update Vertices?
Posted: Wed Jun 15, 2016 2:10 pm
Hello,
I tried updating the Vertices of a StaticMesh like this:
Something is not updated correctly because a RayCast via Space.BroadPhase.QueryAccelerator.RayCast
cant seem to hit the new StaticMesh.
Any Ideas?
Thanks,
tice
I tried updating the Vertices of a StaticMesh like this:
Code: Select all
// startup
myStaticMesh = new StaticMesh(vertices, indices);
Space.Add(myStaticMesh);
Code: Select all
// sometime later in the program
for (int i = 0; i < vertices.Length; i++)
vertices[i] += new Vector3(10, 0, 0);
myStaticMesh.Mesh.Data.Vertices = vertices;
myStaticMesh.Mesh.Tree.Reconstruct();
cant seem to hit the new StaticMesh.
Any Ideas?
Thanks,
tice