Hey, I made the following changes as you mentioned before here is how the code looks right now
public void ConvertVerticlesToMesh(CustomVertex.PositionColored[] vertex) { this._mesh.LockVertexBuffer(LockFlags.None); this._mesh.VertexBuffer.SetData(vertex, 0, LockFlags.None); this._mesh.UnlockVertexBuffer(); }
public CustomVertex.PositionColored[] getVerticles(Mesh mesh) { GraphicsStream gs = mesh.LockVertexBuffer(LockFlags.None); verts = new CustomVertex.PositionColored[mesh.NumberVertices]; for (int i = 0; i < mesh.NumberVertices; i++) { verts=(CustomVertex.PositionColored)gs.Read(typeof(CustomVertex.PositionColored)); } mesh.UnlockVertexBuffer(); return verts; }
but nothing really changed, what I have noticed that with some of the vertices, I can change only one coordinate, and for example for the vertex number 1 (still talking about the same geometry), when I change the Z position, it actually acts like X coordinate, and it goes from left to right, I can move the camera around the scene, and It really doesn't go on the Z axis, with the X and Y I can't see no changes at all, even better when I select vertex 2, it still moves the same vertex but now only X works but It acts like a Z axis, the 3rd vertex works like it should I can move it around X, Y, and Z like it should work, the next vertex again doesn't work like I was expecting...
Anyway, I think that there is some strange relationship between the vertexes
created with the Mesh class, like I am using Mesh.polygon function... help me out I am out of clues