myMesh = {}
myMesh[0].x = 30
Nope... doesn't work.
myMesh = Mesh.new{}
myMesh[0].x = 30
Nope... no go.
An array of meshes should be possible, but I don't know how. Can someone help? Thanks
Edit: Thanks for your responses. Pardon me for this stupid mistake. I just realized, "What nonsense are you doing J?" I really wanted an array of vertices of the mesh, so that I can use loops to manipulate them. Sorry about that... although it didn't hurt to learn how to get an array of meshes.
So I figured it out, because I was sure I did this before, when I used gml.
ptx = {}; pty = {}; ptz = {}
ptx[1] = myMesh.x; pty[1] = myMesh.y; ptz[1] = myMesh.z;
Thanks for the help though. I also learned that lua doesn't use index 0
Edit: Wait. That doesn't work either does it?
Well for now this gives no error, so I'll see if it does what I want.
pMesh = {}
for m=1, 6 do
pMesh[m] = Mesh.new()
end
pMesh[1].x = 0; pMesh[1].y = 0; pMesh[1].z = 0
Thanks guys. If you have any other suggestions, I'm all ears.