Hi, I have an integer that is something like this:
var verts : int[];
var vertices = mesh.vertices;
for (int i=0; i<vertices.Length; i++) {
verts _= vertices*;*_
_*}//this is only an example*_
_*```*_
_*<p>but what I want is actually remove some vertices lets say 3,4 and 5.(this is only an example)*_
_*So I want something that search for that number in the size of the length of the array and remove that element and the others that are bigger than that size cross it 1 number.*_
_*Example:Lets say I want to remove the element 2 I want in the script to search for it, remove the element 2 and finally cross it 1 number. Something like this:</p>*_
_*<blockquote>*_
_*<p>Element0 = 0,0,0*_
_*Element1 = 1,0,0*_
_*Element2 = 1,0,1*_
_*Element3 = 0,0,1</p>*_
_*</blockquote>*_
_*<p>change it to:</p>*_
_*<blockquote>*_
_*<p>Element0 = 0,0,0*_
_*Element1 = 1,0,0*_
_*Element2 = 0,0,1</p>*_
_*</blockquote>*_
_*<p>Note: someone could say why you don't easily add if(i >=3 && i <= 5){ but as I say this is an example, that's not the finality of doing this.</p>*_
what do you mean with vertex is ok to copy?
– KissieWhatever you meant by "something that search for that number in the size and remove that element and the others that are bigger than that size cross it 1 number." I assume there will be some test for some vertex size. If it's simply avoiding vertices 3,4 and 5 then it would be if (i >=3 && i <= 5)
– Nonithe thing is that I'm trying to search for the : if (vertex is ok to copy). That part is actually what I want to know.
– KissieI'm sorry. I don't understand the condition you want to test for. When you say 'size' do you mean the magnitude of the vector? Distance? Or the values of x, y, and/or z being over some limit? Or length of the array?
– NoniI mean with the length of the array
– Kissie